zhukov
04/28/2022, 8:17 AMMuezz
04/28/2022, 11:31 AMraise notice
will do what I am trying to do. But nothing appears in the console log. I also tried raise exception
and that works but the problem with that is that the function stops because of that exception.
I found this stackoverflow question where the anser for this is: Check the value for "client_min_messages" in your session - it should be "NOTICE" or later to see notices.
I have gone through the settings and I cannot find any option to toggle this to notice
.cdro
04/28/2022, 4:43 PMconst { data, error } = await supabase
.from<definitions['event_verifier']>('event_verifier')
.select('id,address, createdAt, verifiedAt, event:eventId (id, slug)', { count: 'exact' })
.eq('event.slug', slug);
What I am noticing is that records that don’t pass the eq
are still returned, with that field set to null.
{
id: 'f5547b29-4820-4e95-ade5-df6dfbcc07f8',
address: '0x9372Eb1DfF66859B9e8D05D6014F5d1d87d031c4',
createdAt: '2022-04-23T19:56:01.486799+00:00',
verifiedAt: null,
event: null
},
I have to take an additional step here and filter through the result to make sure that an event object is there.
Is there a way to omit the return result entirely if .eq('event.slug', slug)
doesn’t pass?Muezz
04/28/2022, 8:53 PMtype of parameter 1 (record) does not match that when preparing the plan (db_transactions)
For the code, context and details, check the thread. I would really appreciate any sort of help.msy
04/29/2022, 3:25 AMconst { user, session, error } = await supabase.auth.signUp(
{
email: email,
password: password,
},
{
data: {
firstName,
lastName,
email,
rating: 0,
profilePicURL: "",
},
}
);
This adds to the auth table:xephyr
04/29/2022, 3:38 AMERROR: must be member of role "supabase_admin"
when trying to supabase db push
to my production instance after having worked off a dev
instance for the past day or so. Have been through the usual Google searches but all threads I've read are talking about the Supabase Studio SQL editor, not running commands locally. What do I have to do locally to be a member of the supabase_admin
role?msy
04/29/2022, 5:03 AMconst { user: authUser } = await supabase.auth.api.getUserByCookie(req);
// Check if the user is logged
if (authUser === null) {
// Redirect if no logged in
return { props: {}, redirect: { destination: "/" } };
}
// If logged return the user
let { user, error } = await supabase.from("users").select("id, first_name");
console.log("user", authUser);
if (user) {
return { props: { user: user } };
} else {
return { props: {}, redirect: { destination: "/" } };
}
I read on the supabase documentation that with the set policies I wouldn't need to filter and I could directly do .from("users") and get the relevant row from the public users table, with the primary key set as a foreign key to the auth.users table
Note: authUser is returning the correct value.improb
04/29/2022, 7:35 AMimprob
04/29/2022, 7:36 AMpedrodiaz
04/29/2022, 12:13 PMNeedle
04/29/2022, 12:13 PM/title
command!
We have solved your problem?
Click the button below to archive it.torkleyy
04/29/2022, 1:49 PMStudywithdesign
04/29/2022, 2:23 PMsupabase.from('posts').select('id, title, count(likes(auhtor_id)));
AmusedGrape
04/29/2022, 2:59 PMlimzee
04/29/2022, 3:07 PMyxsh
04/29/2022, 3:32 PMdarlansbjr
04/29/2022, 4:18 PMsimply
04/29/2022, 4:40 PMGarett MacGowan
04/30/2022, 12:00 AMScott Prins
04/30/2022, 12:12 AMMateus Rossetto
04/30/2022, 12:55 AMNARCISO
04/30/2022, 12:57 AMsubscriptions
.
I'm using NextJS
and I use a hook in 2 different pages to setup the subscription that is basically this (copied from the nextjs-slack-clone
official example):
...
useEffect(() => {
const messageListener = sb
.from<Message>("message")
.on("INSERT", (payload) => setTempNewMessage(payload.new))
.subscribe((event, e) => {
console.warn(`[Message] Listener ${event}`, messageListener);
if (e) {
console.error("[Message] Listener error", e);
}
});
console.error("STARTED LISTENING...", messageListener);
// Cleanup on unmount
return () => {
messageListener
.unsubscribe()
.receive("ok", () => console.error("!SUBSCRIPTION REMOVED!"));
};
}, []);
At the first page load, the subscription is all good and works perfectly.
But when I do router.push
to the other page, it unsubscribe correctly but the new subscription starts CLOSED
and even the RETRYING_AFTER_TIMEOUT
does nothing.
Any ideas?Needle
04/30/2022, 1:07 AM/title
command!
We have solved your problem?
Click the button below to archive it.Sasial
04/30/2022, 9:33 AMTobbe
04/30/2022, 9:55 AMLukas V
04/30/2022, 10:16 AMNeedle
04/30/2022, 11:43 AM/title
command!
We have solved your problem?
Click the button below to archive it.Shane
04/30/2022, 5:04 PMpocin
04/30/2022, 7:24 PM$ supabase start
), where are the actual files stored? Is there some filesystem mock of the s3 api?Keeko
04/30/2022, 11:37 PM