Provide if the user is an admin or not

This commit is contained in:
Lncvrt committed 2026-02-24 19:35:13 -07:00
1 parent 2c199339e0
commit 9caea847ec
1 file changed
+4 -2
+4 -2
View File
@@ -27,7 +27,8 @@ export const handler = async (context: Context) => {
id: users.id,
username: users.username,
password: users.password,
token: users.token
token: users.token,
admin: users.admin
})
.from(users)
.where(eq(users.username, body.username))
@@ -61,7 +62,8 @@ export const handler = async (context: Context) => {
data: {
session: user[0].token,
username: user[0].username,
id: user[0].id
id: user[0].id,
admin: user[0].admin
}
})
}