oscar_gallog
01/30/2022, 8:39 PMEXISTS(SELECT 1 FROM service_users where service_users.user_id = auth.uid()) OR EXISTS(SELECT 1 FROM teams WHERE teams.user_id = auth.uid))
But I just get an error, any idea how to fix? I'm not an SQL expert as you can seegaryaustin
01/30/2022, 8:49 PMoscar_gallog
01/30/2022, 8:51 PMSeñor Bruno
01/30/2022, 9:12 PMSeñor Bruno
01/30/2022, 9:57 PM6ary
01/30/2022, 10:06 PMgaryaustin
01/30/2022, 10:36 PMthecoderatekid
01/30/2022, 10:39 PMDanB
01/31/2022, 12:22 AMjdgamble555
01/31/2022, 2:18 AMTundra
01/31/2022, 2:33 AMmathurah
01/31/2022, 2:36 AMconst getPosts = async () => {
const response = await getAllPosts();
console.log("this is response", response);
// return response;
};
which refers to this function in my backend supabase.js
file
export const getAllPosts = async () => {
const { data: posts, error } = await supabase
.from("post")
.select()
.order("created_at", { ascending: false });
if (error) {
handleError(error);
}
console.log(posts);
return posts;
};
but when I console log, I just see this in the console - is there anyway I can get access to the data I'm returning - am I writing this getPosts function wrong here?vanderrlay
01/31/2022, 4:09 AMgaryaustin
01/31/2022, 4:28 AMSourabh
01/31/2022, 4:50 AMmathurah
01/31/2022, 4:51 AMSourabh
01/31/2022, 4:54 AMsilentworks
01/31/2022, 7:09 AMjbergius
01/31/2022, 7:43 AM/config
route. Someone else has experienced this?silentworks
01/31/2022, 7:50 AMjbergius
01/31/2022, 7:50 AMlistening to dev podcast
01/31/2022, 9:20 AMlistening to dev podcast
01/31/2022, 9:20 AMzander
01/31/2022, 9:52 AMcreate table ..., create policy ...
etc etc
I'd like to open source my project and have this as a was for others to run it themselves.silentworks
01/31/2022, 9:55 AMdmitriy.dranko
01/31/2022, 2:32 PMawait supabase.auth.api.setAuthCookie(req, res)
, but when I sign out, I also try to do res.setHeader('Set-Cookie', 'sb:token=deleted; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT');
. This works locally, but when deployed to Vercel, the sb:token
persists on following requests and therefore I pass my middleware auth checks and access protected pages unintentionally.
FYI, doing the cookie management inside of a NextJS API. My NextJS FE calls my internal NextJS API during sign in/sign out to add/remove cookies respectively.
1) Does Supabase have a cleaner way of removing cookies?
2) If not, is there any idea of what is going wrong?
Thanks in advance. I love Supabase so far 🙂dmitriy.dranko
01/31/2022, 4:53 PMLothar
01/31/2022, 10:08 PMstabacco
01/31/2022, 10:21 PMingredient-prints
table to know exactly. It looks to me like you are supposed to fill in some values in the foreign key for a field named master
or similar.Lothar
01/31/2022, 10:22 PM