pippin_mole
04/22/2023, 3:59 PMhttps://cdn.discordapp.com/attachments/1099363890833408112/1099363891064098928/Screenshot_2023-04-22_at_16.png▾
https://cdn.discordapp.com/attachments/1099363890833408112/1099363891328319548/Screenshot_2023-04-22_at_16.59.31.png▾
Noah
04/22/2023, 4:13 PMfred kufner
04/22/2023, 4:15 PMNokorbis
04/22/2023, 5:00 PMuser_permission
that contains an access list for my users.
When I compare the id stored in this table with the id returned by auth.uid(), it never works.
When I compare the id with the string matching the user_id, it works.
I encountered the issue first with RLS, but with the idea to find the cause I created 2 stored procedures (both configured with SQL language) that I call within my browser.
The first one ("is_animator") is the one I first used in the RLS but I now call through supabase.rpc('...') (in js code).
sql
SELECT EXISTS (SELECT 1 from user_permission WHERE is_animator = true AND user_id = auth.uid())
The second stored procedure ("test_uid') is :
sql
SELECT auth.uid();
When I call supabase.rpc('test_uid'), I get the result I expect : "f07d5cd9-8b83-4c62-9140-c62630e58497"
When I call supabase.rpc('is_animator'), I get false
while in my database, I do have a record with this user_id.
Any idea what might be the cause ?aslakoam
04/22/2023, 10:33 PM20lentin
04/22/2023, 11:49 PMsaule
04/23/2023, 12:48 AMnaveeng2402
04/23/2023, 1:42 AMven
04/23/2023, 2:12 AMFailed to retrieve database webhooks
error. pls see attached clip. Is that feature not currently available for local development?
https://cdn.discordapp.com/attachments/1099518136589496423/1099518225219321896/supabase_local_webhooks.jpg▾
Franck
04/23/2023, 4:09 AMts
import { createClient } from "https://esm.sh/@supabase/supabase-js@2.21.0";
import { serve } from "https://deno.land/std@0.168.0/http/server.ts";
import sgMail from "https://esm.sh/@sendgrid/mail@7.7.0";
import dayjs from "https://esm.sh/dayjs@1.11.7";
Although, I'm getting the following error that seems related to the @sendgrid/mail
import:
bash
Error: Error bundling function: exit status 1
file:///src/import_map.json
file:///src/index.ts
error: Uncaught (in promise) Error: Relative import path "https" not prefixed with / or ./ or ../ and not in import map from "https://esm.sh/v117/@types/node@18.15.13/https.d.ts"
const ret = new Error(getStringFromWasm0(arg0, arg1));
^
at __wbg_new_8d2af00bc1e329ee (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:312:19)
at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:79439)
at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1388039)
at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1862894)
at __wbg_adapter_18 (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:146:6)
at real (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:130:14)
Any recommendation on how to solve this? Thanksmiguelmichelson
04/23/2023, 5:22 AMtristansinclair
04/23/2023, 6:55 AMsupabase stop --backup
and creating a DB backup, how can I actually restore this data when I want to start up again?dfasdfghadfhg
04/23/2023, 8:56 AMhttps://cdn.discordapp.com/attachments/1099619905109766204/1099619905269157948/image.png▾
alpha_
04/23/2023, 9:00 AMPhilipp_Nut
04/23/2023, 9:43 AMYokoWasis
04/23/2023, 10:09 AMusers.email=auth.email() AND users.role='admin'
is exists on users
table. If it exists allow the CRUD operation on thistable
Revaycolizer
04/23/2023, 11:23 AMhttps://cdn.discordapp.com/attachments/1099656667127365672/1099656667253198899/module.png▾
emerql
04/23/2023, 12:09 PMgroi
04/23/2023, 1:19 PMself.rest_url: str = f"{supabase_url}/rest/v1"
self.realtime_url: str = f"{supabase_url}/realtime/v1".replace("http", "ws")
self.auth_url: str = f"{supabase_url}/auth/v1"
Is there a way to make the original URL still available?onurhan1337
04/23/2023, 1:41 PMAzimeel
04/23/2023, 3:28 PMVersion 1.30.3 is already installed
Bundling user-create
Error: Error bundling function: exit status 1
file:///src/import_map.json
file:///src/index.ts
file:///src/shared/models/result.ts
file:///src/shared/models/user-create.ts
file:///src/shared/models/user.ts
file:///src/shared/supabase/supabase-client.ts
error: Uncaught (in promise) Error: NotFound: The system cannot find the path specified. (os error 3)
const ret = new Error(getStringFromWasm0(arg0, arg1));
^
at __wbg_new_8d2af00bc1e329ee (https://deno.land/x/eszip@v0.35.0/eszip_wasm.generated.js:513:19)
at <anonymous> (https://deno.land/x/eszip@v0.35.0/eszip_wasm_bg.wasm:1:1559899)
at <anonymous> (https://deno.land/x/eszip@v0.35.0/eszip_wasm_bg.wasm:1:1398157)
at <anonymous> (https://deno.land/x/eszip@v0.35.0/eszip_wasm_bg.wasm:1:1895031)
at __wbg_adapter_40 (https://deno.land/x/eszip@v0.35.0/eszip_wasm.generated.js:229:6)
at real (https://deno.land/x/eszip@v0.35.0/eszip_wasm.generated.js:213:14)
Try rerunning the command with --debug to troubleshoot the error.
my import map:
{
"imports": {
"/shared/": "./shared/",
"@supabase/supabase-js": "https://esm.sh/@supabase/supabase-js@2.21.0",
"postgres": "https://deno.land/x/postgres@v0.14.2/mod.ts",
"std/server": "https://deno.land/std@0.168.0/http/server.ts",
"zod": "https://deno.land/x/zod@v3.21.4/mod.ts"
}
}
I'm using CLI 1.50.11
I'm on Windows.brassotron
04/23/2023, 3:52 PMTimurKramar
04/23/2023, 3:57 PMconst {data} = supabase.from("ingredient_versions").select("*").eq('id',id)
, typescript says that data is either the object representing the row in my database, an array of these objects, or null. But how can it ever by just the object. If I understand it correctly, unless i add .single()
at the end, it should always be an array or null if any error occured. No? This makes it particularily difficult to send any fetch data down as props in typescript, as I never know whether it is an array, or directly the object. If there is some trick on how to send any fetched data (or better, how to define a component that accepts fetched data) without defining custom types and only using the autogenerated, I would love to hear it. In next.js app dir this would be perhaps the most useful feature. Thanks!zaineb damak
04/23/2023, 4:08 PMhttps://cdn.discordapp.com/attachments/1099728561578983567/1099728561721573436/Capture_decran_2023-04-23_170613.png▾
insivika
04/23/2023, 5:59 PMhttps://cdn.discordapp.com/attachments/1099756388890189876/1099756389133467739/Screen_Shot_2023-04-23_at_12.56.24_PM.png▾
Yuu
04/23/2023, 6:41 PMts
const query = 'user@example.com'
const user = await supabase.from('users_with_profiles').select('*')
.or(`email=eq.${query},username=eq.${query}`)
.single();
It fails with error
'unexpected "=" expecting letter, digit, "-", "->>", "->" or delimiter (.)'
'"failed to parse logic tree ((email=eq.user@example.com,username=eq.user@example.com))" (line 1, column 9)'
Note that if i get the same error if the 2nd parameter doesn't contain a .
'"failed to parse logic tree ((email=eq.user@example.com,username=eq.user123))" (line 1, column 9)'
I'm not sure how to solve thiseforblue
04/23/2023, 7:49 PMjustJosuke
04/23/2023, 7:50 PMbboss
04/23/2023, 8:27 PMxdcx18
04/23/2023, 8:35 PM