ivanq3w
08/20/2021, 7:40 PMHEAVYPOLY
08/20/2021, 8:35 PMGustavogsb
08/20/2021, 8:49 PMThisIsJustin
08/20/2021, 10:13 PMselect email
from public.space_users su
join users u on su.user_id = u.id
where u.unsubscribed is null
How can I do that last line with the supabase client?Miguel
08/20/2021, 11:04 PMMiguel
08/20/2021, 11:05 PMbenwis
08/21/2021, 1:28 AMMrWolf
08/21/2021, 2:19 AMMrWolf
08/21/2021, 2:19 AMforeign key constraint "CoreProjects_fk0" cannot be implemented
MrWolf
08/21/2021, 2:19 AMGustavogsb
08/21/2021, 3:59 AMyurix
08/21/2021, 7:06 AMDi
08/21/2021, 7:37 AMDi
08/21/2021, 7:41 AMCAMOU
08/21/2021, 11:43 AMjs
import supabase from '$lib/db'
export async function post(request) {
let email = request.body.get('email')
let password = request.body.get('password')
let c_password = request.body.get('c_password')
if (password !== c_password) {
return {
status: 401,
body: 'Passwords are not matching'
}
}
const { session, error } = await supabase.auth.signUp({email, password})
if (error) {
return {
status: error.status,
body: error.message
}
}
return {
status: 200,
body: 'success',
headers: {
'set-cookie': `session=${session.user.id}; Path=/; HttpOnly; Secure; SameSite=Strict; Expires=${new Date(session.expires_at * 1000).toUTCString()};`
}
}
}
silentworks
08/21/2021, 12:30 PMfengkx
08/21/2021, 1:46 PMsilentworks
08/21/2021, 1:48 PMfengkx
08/21/2021, 1:49 PMfengkx
08/21/2021, 1:50 PMsilentworks
08/21/2021, 1:51 PMfengkx
08/21/2021, 1:53 PMwindow.location.href
? any security issue?Peanut
08/21/2021, 2:28 PMPeanut
08/21/2021, 2:35 PM{"code":401,"msg":"Invalid user"}
I am using the js .signOut()
method and I tried passing my custom JWT and without it.Peanut
08/21/2021, 3:17 PMMrWolf
08/21/2021, 5:34 PMuser
08/21/2021, 7:42 PMMrWolf
08/21/2021, 10:54 PMMrWolf
08/21/2021, 10:55 PMshubhamverma
08/22/2021, 2:39 AMjs
supabse.from("table_name").insert([...])
But didn't work?What am I doing wrong here?