omar
06/28/2022, 8:08 AMomar
06/28/2022, 8:09 AMsql
begin
INSERT INTO public.payment(user_id, therpay_session_id)
VALUES (userid, sessionid);
INSERT INTO public.booking(user_id, therpay_session_id)
VALUES (userid, sessionid);
return id;
end;
both variable types are set to uuid
my rpc call from the client
js
const { data, error } = await supabase.rpc(
'record_payment_and_booking', {
userid: userId,
sessionid: sessionId,
}
)
console.log({data})
})omar
06/28/2022, 8:09 AM{
message: 'invalid input syntax for type uuid: "5"',
code: '22P02',
details: null,
hint: null
}omar
06/28/2022, 8:25 AMomar
06/28/2022, 8:26 AM