chore: fix lint errors — auto-format, isNaN, unused imports, button type
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,11 @@ const [user] = await db
|
||||
.update(users)
|
||||
.set({ isAdmin: !revoke })
|
||||
.where(eq(users.logtoSub, sub))
|
||||
.returning({ id: users.id, logtoSub: users.logtoSub, isAdmin: users.isAdmin });
|
||||
.returning({
|
||||
id: users.id,
|
||||
logtoSub: users.logtoSub,
|
||||
isAdmin: users.isAdmin,
|
||||
});
|
||||
|
||||
if (!user) {
|
||||
console.error(`User not found with logto_sub: ${sub}`);
|
||||
@@ -30,4 +34,6 @@ if (!user) {
|
||||
}
|
||||
|
||||
const action = revoke ? "Revoked admin from" : "Granted admin to";
|
||||
console.log(`${action} user ${user.id} (${user.logtoSub}) — isAdmin: ${user.isAdmin}`);
|
||||
console.log(
|
||||
`${action} user ${user.id} (${user.logtoSub}) — isAdmin: ${user.isAdmin}`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user