React noob
08/08/2022, 6:23 PMts
const submit = async (_data: Props) => {
const {user,error} = await supabase.auth.signIn({
email: _data.email
})
if(user){
console.log('ok')
}
if(error){
console.log(error.message);
}
}
why log "ok" do not work but i can see the user in the auth.users ? i wan't do more it if pass like redirect on a new page or display a messagegesusc
08/08/2022, 6:45 PMgorbypark
08/08/2022, 7:27 PMsupabase functions serve checkout
) works perfectly fine and I get the expected response from the Stripe server. Deploying the function gives me an error in the supabase logs of Uncaught SyntaxError: Identifier 'delay' has already been declared
. Any ideas? Is supabase functions serve using a different version of deno than deployed versions, possibly?Twisted Chaz
08/08/2022, 7:42 PMsql
SELECT users.firstname, ratings.rating
FROM ratings
JOIN users ON users.id = ratings.user_id
WHERE album_id = 4
ORDER BY users.firstname ASC;
bennyp
08/08/2022, 7:56 PMNicoNico
08/08/2022, 8:25 PMReact noob
08/08/2022, 10:37 PMsql
DROP TRIGGER handle_new_user IF EXISTS on auth.users.created `
but i get this error ``Failed to run sql query: cross-database references are not implemented: "auth.users.created"``
sql
-- inserts a row into public.users
create function public.handle_new_user()
returns trigger
language plpgsql
security definer set search_path = public
as $$
begin
insert into public.profiles (id,username)
values (new.id,'John Doe');
return new;
end;
$$;
-- trigger the function every time a user is created
create trigger on_auth_user_created
after insert on auth.users
for each row execute procedure public.handle_new_user();
it is the new i want replace itProfilüfter
08/08/2022, 11:21 PMaggmoulik
08/09/2022, 7:06 AMsbr
08/09/2022, 8:13 AMthsko
08/09/2022, 8:38 AMcould not find array type for data type character varying[]
Here's the query:
supabase.from("CandidateProfiles").select("*").in("job_types", ["Full-time"])
job_types
in my database is an array
of varchar
.
Thank you!! 🙏gorbypark
08/09/2022, 11:39 AMKurooo
08/09/2022, 1:54 PMCheqo
08/09/2022, 4:23 PMresize-images
yet, so I thought of doing this, can you tell me if thats a good solution for now?
I would create a lambda function that users sharp
image resizing library:
1. convert image to base64 string and pass it to my lambda function
2. lambda compresses the image and returns base64string
3. I convert the returned base64 string into an image
4. send the compressed image to supabase storage
I know that there are some client side javascript libraries, but I don't think any of them are actually good when it comes to very small images, what do you think of this solution or is there something that would be better for my use case?Huntedman
08/09/2022, 6:55 PMrankala
08/09/2022, 9:38 PMts
const filePath = `${date.getFullYear()}/${date.getMonth()}/${uuid()}.${file.fileObj.name.split('.').pop()}`
in another part, i want a list of all files of path's in a bucket.
my guess, I need to do this:
ts
const {data: files, error} = await supabase.storage.from('bucketid').list();
But here, i only get an id and a name, but not the full path. i am missing the year and month.Needle
08/09/2022, 10:54 PMcaseycrogers
08/10/2022, 2:05 AMsome_bool
(trues first, then falses)\. I'm using flutter_supabase: 1.0.0-dev.3
. The ordering I'm getting back seems arbitrary.
await supabase.from('some_table').select().order('some_bool');
49Ryann
08/10/2022, 3:51 AMApe R Us
08/10/2022, 6:57 AMbenjaminbialy
08/10/2022, 8:35 AMVuNguyen
08/10/2022, 9:18 AMe.sh
08/10/2022, 10:35 AMAnoushk
08/10/2022, 12:14 PM49Ryann
08/10/2022, 12:37 PMDesertRodent
08/10/2022, 1:01 PMboeledi
08/10/2022, 1:02 PMsupabase functions deploy hello-world
Bundling hello-world
Error: Failed to create a new Function on the Supabase project: {"id":"fe576b3d-3592-4efd-abe7-fbdde8c46a95","slug":"hello-world","name":"hello-world","version":1,"status":"ACTIVE","created_at":1660136284125,"updated_at":1660136284125,"verify_jwt":true}
When I have a look at the Dashboard, the Function is there but when I try to invoke it I receive
502: Bad Gateway (DEPLOYMENT_FAILED)
The deployment failed while serving the request.
Would you have an idea what I am doing wrong? Thankssidharth28
08/10/2022, 1:02 PMsidharth28
08/10/2022, 1:07 PMpaddyfink | Pesabooks
08/10/2022, 1:43 PM502: Bad Gateway (DEPLOYMENT_FAILED)
The deployment failed while serving the request.