Skip to content

Commit 41c6d47

Browse files
committed
Devlog count bug fix
1 parent 2d36c3f commit 41c6d47

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/routes/dashboard/admin/admin/users/[id]/+page.server.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export async function load({ locals, params }) {
2121
})
2222
.from(user)
2323
.leftJoin(devlog, eq(devlog.userId, user.id))
24-
.where(eq(user.id, 1))
24+
.where(eq(user.id, id))
2525
.groupBy(user.id)) ?? [{ devlogCount: 0 }];
2626

2727
if (!queriedUser) {
@@ -51,6 +51,8 @@ export const actions = {
5151
const hasAdmin = data.get('has_admin');
5252
const hasProjectAuditLogs = data.get('has_project_audit_logs');
5353

54+
// TODO: add check to disable un-admining superadmin
55+
5456
await db
5557
.update(user)
5658
.set({

0 commit comments

Comments
 (0)