o/ I have the code below (JS) and I need to someho...
# help
s
o/ I have the code below (JS) and I need to somehow use .eq() to check if the authenticated user's id (string) matches the userid column (UUID)... does anybody know how i can do that?
Copy code
js
let { data, error, status } = await supabase
                .from('venues')
                .select(`name`)
                .eq('userid', user!.id)
                .single();
Apologies if this is blatantly obvious but I couldn’t seem to find the answer anywhere on the internet so I thought you all might be able to help
j
hmm i'd try to check 2 things: is
user!.id
definitely non-null? and if it is, does the user id definitely exist in the table?
a
@User you can get the currently logged in user's id using
supabase.auth.user()
and then match that