This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { createHash, randomBytes, randomUUID, timingSafeEqual } from 'node:crypto';
|
||||
import { db } from '../db/index.js';
|
||||
import { ensureAuthSchema } from './schema.js';
|
||||
import { hashPassword, verifyPassword } from './passwords.js';
|
||||
import { systemUsername, type AuthUser, type UserRole } from '../../auth.js';
|
||||
|
||||
@@ -9,9 +8,7 @@ export const SESSION_LIFETIME_MS = 12 * 60 * 60_000;
|
||||
export const SESSION_IDLE_MS = 30 * 60_000;
|
||||
const digest = (value: string) => createHash('sha256').update(value).digest('hex');
|
||||
function database() {
|
||||
const handle = db();
|
||||
ensureAuthSchema(handle);
|
||||
return handle;
|
||||
return db();
|
||||
}
|
||||
type UserRow = {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user