This commit is contained in:
Andras Schmelczer 2026-05-31 13:17:11 +01:00
parent c995f12f8b
commit 8dc939d761
44 changed files with 3540 additions and 2159478 deletions

View file

@ -8,6 +8,7 @@ export interface AuthUser {
isAdmin: boolean;
subscription: string;
newsletter: boolean;
canSeeListings: boolean;
}
function recordToUser(record: { id: string; [key: string]: unknown }): AuthUser {
@ -20,6 +21,7 @@ function recordToUser(record: { id: string; [key: string]: unknown }): AuthUser
isAdmin: typeof record.is_admin === 'boolean' ? record.is_admin : false,
subscription: typeof record.subscription === 'string' ? record.subscription : 'free',
newsletter: typeof record.newsletter === 'boolean' ? record.newsletter : false,
canSeeListings: typeof record.can_see_listings === 'boolean' ? record.can_see_listings : false,
};
}