good
This commit is contained in:
parent
c995f12f8b
commit
8dc939d761
44 changed files with 3540 additions and 2159478 deletions
|
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue