see comments

This commit is contained in:
Rajpreet0 2026-09-27 01:48:15 +02:00
parent 478adcabca
commit bc71928e1c
5 changed files with 19 additions and 12 deletions

View file

@ -28,10 +28,10 @@ export const getProfile = cache(async () => {
export const verifySession = cache(async () => {
const user = await getSession()
if (!user) redirect("/login")
if (!user) redirect("/")
const profile = await getProfile();
if(!profile) redirect("/login")
if(!profile) redirect("/")
return {
userId: user.id,

View file

@ -10,7 +10,7 @@ begin
new.id,
new.email,
coalesce(new.raw_user_meta_data->>'name', ''),
coalesce((new.raw_user_meta_data->>'role')::public.user_role, 'client')
'client'
);
return new;
end;