lucis
01/19/2023, 12:14 PMTomM101
01/19/2023, 12:47 PMI.Cheered
01/19/2023, 1:43 PMjs
const { data: levels, error } = await supabase
.from('levels')
.select("id, course_id, sequence_id, presets:preset_id(id, name, cleff_id)")
.eq('course_id', course.id)
I don't know how to query 'through' a joins table to fetch the notes though. Does anyone have an idea?Guy Rozen
01/19/2023, 2:34 PMHultnér
01/19/2023, 2:41 PMdextah
01/19/2023, 3:14 PMMichael Maust
01/19/2023, 4:13 PMNonStopDev
01/19/2023, 4:49 PMMartin Piliar
01/19/2023, 4:57 PMSQL
CREATE POLICY user_roles_update_policy ON user_roles
FOR UPDATE
TO public
USING (role = 'admin' AND user_id = auth.uid());
but it doesn't allow me to edit anything, even though the logged user with the user_id has a role 'admin', am I missing something? I want the admin users to edit other users roles. Thank you!athomas
01/19/2023, 5:34 PMVik
01/19/2023, 8:09 PMFainaru
01/19/2023, 7:00 PMrhenium2
01/19/2023, 7:35 PMIrfan Ahmed
01/19/2023, 7:48 PMelliott
01/19/2023, 8:02 PMJohnny
01/19/2023, 8:10 PMts
data: { user: null, session: null }
err: AuthApiError: duplicate key value violates unique constraint "users_email_partial_key"
at E:\Programming\Svelte\Boilerplate\boilerplate\SvelteBoilerplate\node_modules\@supabase\gotrue-js\dist\main\lib\fetch.js:41:20
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
__isAuthError: true,
status: 500
as response but the user with the + in the mail is being created. Anyone an idea why?rchrdnsh
01/19/2023, 8:37 PMts
import { createClient } from '@supabase/auth-helpers-sveltekit'
import { env } from '$env/dynamic/public'
export const supabase = createClient(env.PUBLIC_SUPABASE_URL, env.PUBLIC_SUPABASE_ANON_KEY)
...which is copied directly from the docs...
I have two separate sties that are both experiencing the same error ATM...jh
01/19/2023, 9:02 PMSQL
SELECT *
FROM "public"."view_storage_objects"
WHERE bucket_id = 'avatars'
AND path_tokens [1] = '988a5762-7859-4aa6-b9bd-78fabd775320';
And here is the supabasejs code I attempted to use:
ts
const { data, error } = await supabaseClient
.from('view_storage_objects')
.select('name')
.eq('bucket_id', 'avatars')
.eq('path_tokens[1]', user.id);
Unfortunately I'm thrown this error:
json
{
code: "22P02",
details: 'Array value must start with "{" or dimension information.',
hint: null,
message: 'malformed array literal: "988a5762-7859-4aa6-b9bd-78fabd775320"'
}
Any suggestions would be appreciated. Thanks!Rake
01/19/2023, 9:14 PMmoroshko
01/19/2023, 11:59 PMJoseph
01/20/2023, 12:16 AM1voy
01/20/2023, 1:13 AMmansedan
01/20/2023, 1:39 AMsql
begin
insert into public.notifications (type, post, profile, sender)
values ('comment', new.post, new.post.author, new.author);
return new;
end;
Except new.post.author
isn't working. What are we missing here?
post.author
being a Foreign Key to a uuid
Thank you!lampaboy
01/20/2023, 3:24 AMnpm install supabase --save-dev
, after running supabase -h
, it returns:
supabase : The term 'supabase' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
Not sure if it is the right way, but it works when I do npx supabase -h
. Moving along with npx supabase init
, it works and returns, Finished supabase init.
.
This then fails again at npx supabase start
with:
Error: error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/_ping": open //./pipe/docker_engine: The system cannot find the file specified.
in github.com/supabase/cli/internal/utils.AssertDockerIsRunning:48
in github.com/supabase/cli/internal/start.Run:34
There seems to be a lot of issues, there are some workarounds, but I'd rather not initialize the project with workarounds at the moment. Does anybody have a solution for this?rlightner
01/20/2023, 3:38 AMroyboy789
01/20/2023, 3:43 AM{
"code": 401,
"msg": "invalid claim: missing sub claim"
}
Eventually I'll be building this into my code base when a user deletes account, but need to clean up test accounts and stuck here.BritLuey
01/20/2023, 3:48 AMjinsley8
01/20/2023, 7:08 AMjs
export const supabase = createClient<Database>(
process.env.NEXT_PUBLIC_SUPABASE_URL as string,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY as string
);
boeledi
01/20/2023, 7:10 AMWatcher Process started.
error: Following npm specifiers were requested: "stream-chat"; but --no-npm is specified.
Watcher Process finished. Restarting on file change...
I am simply using the "serve" CLI as follows:
supabase functions serve hello --debug
Am I doing anything wrong?cryptoneur
01/20/2023, 9:30 AMmany-to-many
relationship.
I have the following relationship (see photo), where I have a join table grant-blockchains
. In my frontend view, I wanna filter grants based on which blockchain they belong to. Just as explained here: https://supabase.com/blog/postgrest-v10, the pks of grant_blockchains
are grant_id
and blockchain_id
.
In my frontend, if a blockchain
filter is selected, I wanna conditionally filter down grants to only those selected blockchains:
let columns = 'id,logo,twitter,discord,github,telegram,updated_at,slug,name,blockchains(id)'
let table = 'grants'
let query = supabase.from(table).select(columns)
// these come in the forms of an array ['1','2'] and I convert them later to parseint to match the type
if (queryFilters?.blockchains) {
const blokchains = queryFilters?.blockchains.map((blockchain) => parseInt(blockchain))
console.log({ queryFilters, blokchains })
// add filter ids in blokchains table
query = query.in('blockchains(id)', 'in', blokchains)
}
const { data, error } = await query
I get the following error, but also I am not sure if I actually do this correctly:
TypeError: values.map is not a function
at PostgrestFilterBuilder.in
I also tried the filter method but got the same error.
Found also this on GitHub but seems it's solved? https://github.com/supabase/supabase/discussions/1080