export const getUserIdOrGhost = async(supabase) => { const id = await getUserIdOrNull(supabase); console.log(id); if(id) return id; //if the user id is null meaning the user is not logged in, then return the id of the ghost account. const {data: ghostUser} = await supabase.from("user").select("id").eq("username", "ghost").limit(1); return ghostUser[0].id }export const getUserIdOrGhost = async(supabase) => { const id = await getUserIdOrNull(supabase); console.log(id); if(id) return id; //if the user id is null meaning the user is not logged in, then return the id of the ghost account. const {data: ghostUser} = await supabase.from("user").select("id").eq("username", "ghost").limit(1); return ghostUser[0].id }export const getUserIdOrGhost = async(supabase) => { const id = await getUserIdOrNull(supabase); console.log(id); if(id) return id; //if the user id is null meaning the user is not logged in, then return the id of the ghost account. const {data: ghostUser} = await supabase.from("user").select("id").eq("username", "ghost").limit(1); return ghostUser[0].id }
By Lethabo Maepa 2 months ago