fix(auth): drop nonexistent account_blocked column from login lookup
getLoginUser selected users.account_blocked, which does not exist in the DB (nor the Drizzle schema). Every credentials authorize() call threw a SQL error -> NextAuth CallbackRouteError -> 'error=Configuration', so no login could ever succeed. Remove the phantom column from the query and LoginUser interface. Also fix all remaining biome noNonNullAssertion / noExplicitAny lint warnings so CI's check job (biome:lint) passes and the push deploy runs.
This commit is contained in:
1 parent
8275842e78
commit
22d455da7a
13 files changed
+71
-65
No files matched your search
@@ -68,7 +68,8 @@ export default async function ModCfhListPage({
|
||||
ors.push(inArray(SupportTickets.reportedId, userIds));
|
||||
ors.push(inArray(SupportTickets.modId, userIds));
|
||||
}
|
||||
conditions.push(or(...ors)!);
|
||||
const searchFilter = or(...ors);
|
||||
if (searchFilter) conditions.push(searchFilter);
|
||||
}
|
||||
|
||||
const where = conditions.length > 0 ? and(...conditions) : undefined;
|
||||
|
||||
@@ -82,7 +82,8 @@ export default async function ModHelpTicketsPage({
|
||||
if (asId !== null) {
|
||||
ors.push(eq(WebsiteHelpCenterTickets.id, asId));
|
||||
}
|
||||
conditions.push(or(...ors)!);
|
||||
const searchFilter = or(...ors);
|
||||
if (searchFilter) conditions.push(searchFilter);
|
||||
}
|
||||
|
||||
const where = conditions.length > 0 ? and(...conditions) : undefined;
|
||||
|
||||
@@ -69,7 +69,8 @@ export default async function ModTicketsDeskPage({
|
||||
if (Number.isFinite(asId) && asId > 0) {
|
||||
ors.push(eq(WebsiteTicket.id, asId));
|
||||
}
|
||||
conditions.push(or(...ors)!);
|
||||
const searchFilter = or(...ors);
|
||||
if (searchFilter) conditions.push(searchFilter);
|
||||
}
|
||||
|
||||
const where = conditions.length > 0 ? and(...conditions) : undefined;
|
||||
|
||||
@@ -116,7 +116,8 @@ export default async function ModUsersPage({
|
||||
if (Number.isFinite(Number(q)) && Number(q) > 0) {
|
||||
ors.push(eq(User.id, Number(q)));
|
||||
}
|
||||
conditions.push(or(...ors)!);
|
||||
const searchFilter = or(...ors);
|
||||
if (searchFilter) conditions.push(searchFilter);
|
||||
}
|
||||
const where = conditions.length > 0 ? and(...conditions) : undefined;
|
||||
|
||||
|
||||
Reference in new issue
Block a user