feat: complete logins
This commit is contained in:
22
src/lib/database.d.ts
vendored
22
src/lib/database.d.ts
vendored
@@ -140,6 +140,27 @@ export type Database = {
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
users: {
|
||||
Row: {
|
||||
created_at: string
|
||||
id: string
|
||||
is_admin: boolean
|
||||
updated_at: string
|
||||
}
|
||||
Insert: {
|
||||
created_at?: string
|
||||
id: string
|
||||
is_admin?: boolean
|
||||
updated_at?: string
|
||||
}
|
||||
Update: {
|
||||
created_at?: string
|
||||
id?: string
|
||||
is_admin?: boolean
|
||||
updated_at?: string
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
}
|
||||
Views: {
|
||||
[_ in never]: never
|
||||
@@ -269,4 +290,3 @@ export const Constants = {
|
||||
Enums: {},
|
||||
},
|
||||
} as const
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ export const load: LayoutServerLoad = async ({
|
||||
}
|
||||
return {
|
||||
session,
|
||||
adminMode,
|
||||
cookies: cookies.getAll()
|
||||
};
|
||||
};
|
||||
|
||||
@@ -40,5 +40,5 @@ export const load: LayoutLoad = async ({ data, depends, fetch }) => {
|
||||
data: { user }
|
||||
} = await supabase.auth.getUser();
|
||||
|
||||
return { session, supabase, user };
|
||||
return { session, supabase, user, adminMode: data.adminMode };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user