Fix auth flows and add daemon heartbeat endpoint
This commit is contained in:
@@ -16,7 +16,7 @@ async function seed() {
|
||||
// Password: admin123 (argon2id hash)
|
||||
// In production, change this immediately after first login
|
||||
const ADMIN_PASSWORD_HASH =
|
||||
'$argon2id$v=19$m=65536,t=3,p=4$c29tZXNhbHQ$RdescudvJCsgt3ub+b+daw';
|
||||
'$argon2id$v=19$m=65536,t=3,p=4$3968YbMY1wOYMK5NTLa2dQ$j8BkXfK7znAAiuYiC9zWgOaBK11VeimROd28QOMMgd0';
|
||||
|
||||
await db
|
||||
.insert(users)
|
||||
@@ -26,7 +26,15 @@ async function seed() {
|
||||
passwordHash: ADMIN_PASSWORD_HASH,
|
||||
isSuperAdmin: true,
|
||||
})
|
||||
.onConflictDoNothing();
|
||||
.onConflictDoUpdate({
|
||||
target: users.email,
|
||||
set: {
|
||||
username: 'admin',
|
||||
passwordHash: ADMIN_PASSWORD_HASH,
|
||||
isSuperAdmin: true,
|
||||
updatedAt: new Date(),
|
||||
},
|
||||
});
|
||||
|
||||
// Seed games
|
||||
console.log('Seeding games...');
|
||||
|
||||
Reference in New Issue
Block a user