Added notification for admin user (#106)

This commit is contained in:
Doh
2025-04-13 22:01:07 -04:00
committed by GitHub
parent e53e2f649a
commit 909bfa7c6f
14 changed files with 723 additions and 47 deletions

View File

@@ -31,7 +31,8 @@ export type SafeUser = SessionUser & {
}
export type User = SafeUser & {
password: string
password?: string // Optional: Allow users without passwords (e.g., initial setup)
lastNotificationReadTimestamp?: string // UTC ISO date string
}
export type Habit = {
@@ -101,8 +102,9 @@ export const getDefaultUsersData = (): UserData => ({
{
id: uuid(),
username: 'admin',
password: '',
// password: '', // No default password for admin initially? Or set a secure default?
isAdmin: true,
lastNotificationReadTimestamp: undefined, // Initialize as undefined
}
]
});