https://supabase.com/ logo
Join DiscordCommunities
Powered by
# javascript
  • d

    dolmios

    04/08/2022, 2:52 AM
    Hey all, I have what I feel is a pretty simple task but I'm struggling to make sense of the PostgREST docs. Essentially, I have a column` 'voters'` within a
    'projects'
    table, which is structured as an array` ["tom", "mike", ...]` and I'm trying to filter only rows which contain
    "mike"
    (for example). How would this be achieved using the REST API?
    s
    • 2
    • 4
  • s

    Scott P

    04/08/2022, 3:02 AM
    PostgREST array includes
  • z

    Zenon

    04/08/2022, 1:10 PM
    Hey guys I'm getting an Error 400 when trying to access a file from a public bucket. What am I doing wrong with the policies? @User
  • z

    Zenon

    04/08/2022, 1:20 PM
    Here's the policy
  • z

    Zenon

    04/08/2022, 1:20 PM
    I am accessing the URL from the session which is logged in
  • e

    eMeRiKa

    04/08/2022, 3:09 PM
    Is is possible to use postgresql functions like
    jsonb_array_length
    in filters?
    Copy code
    await supabase.from('posts').select('slug, comments!inner(*)', { count: 'exact' })
          .eq("slug", query.slug)
          .gt("jsonb_array_length(comments.content->notes)", 0)
  • f

    fernandolguevara

    04/08/2022, 3:10 PM
    @eMeRiKa u can use a stored procedure to write that query
  • e

    eMeRiKa

    04/08/2022, 3:11 PM
    ha yeah ok I need to use the rpc, thanks
  • l

    Lucas T

    04/08/2022, 7:50 PM
    Is there any easy way to get the whole row from just knowing it's id without getting all the rows?
  • s

    Scott P

    04/08/2022, 7:53 PM
    https://supabase.com/docs/reference/javascript/eq I'd really recommend reading through the docs for questions like this
  • l

    Lucas T

    04/08/2022, 7:53 PM
    Ok, thanks
  • a

    AlanK

    04/09/2022, 6:35 AM
    I feel like I'm missing something simple here... I have a sveltekit app and need to invite users by email. I send the email from the dashboard and click on the link. I have a redirect to my local dev server. All works well except I can't workout how to get the new user to set up a password. Any hints would be greatly appreciated. Arggh - const { error } = await supabase.auth.update({ password }) NOT const { user, error } = await supabase.auth.update({ email, password })
  • z

    Zenon

    04/09/2022, 6:55 AM
    can anyone help me with this please πŸ˜…
    g
    • 2
    • 1
  • g

    garyaustin

    04/09/2022, 2:41 PM
    400 error on public bucket
  • m

    MDobs

    04/09/2022, 4:20 PM
    is there a way to fetch all databases of a project? Their names
    s
    • 2
    • 1
  • l

    Lucas T

    04/09/2022, 10:12 PM
    Is there an easy way to upload a file from to a bucket?
    g
    • 2
    • 16
  • s

    silentworks

    04/09/2022, 10:31 PM
    Fetch database of a project
  • g

    garyaustin

    04/09/2022, 10:36 PM
    upload file to bucket
  • a

    Ape R Us

    04/10/2022, 9:42 PM
    check dms please @silentworks
  • s

    silentworks

    04/11/2022, 1:28 PM
    Please create a thread here and ask your questions here
  • a

    Azura

    04/12/2022, 2:44 AM
    Listen to real-time subscription using containedBy (or cs)
    g
    • 2
    • 7
  • s

    silas

    04/12/2022, 5:41 AM
    Does
    supabase.auth.onAuthStateChange()
    fire an event every time at some point after the page initially loads? For example, if the user is already logged in and visits the page, does an event fire immediately after supabase determines this? Or do events only fire when signing in or signing out is explicitly called?
    g
    s
    b
    • 4
    • 6
  • g

    garyaustin

    04/12/2022, 1:44 PM
    onAuthStateChange events
  • k

    Keviruchis

    04/14/2022, 12:27 AM
    Hi everyone! I'm new to development so I appreciate all the help πŸ™‚ I've started learning with Svelte.js and have grown to love it while using supabase as a backend for my simple blog site. I'm using just the fetch functions to get data from my sb db. The issue I was running into was building my blog post page. When requesting the information it would be returned as an array. Upon doing some research I found that it could be possible to get a single object back by changing the "Accept" header to "application/vnd.pgrst.object+json". It appeared to fix it but then I started getting a 401 which appears to be a CORS issue. Some guidance on this would be great since I've been stuck on this for 3+ days. Thanks!! πŸ˜„
    g
    • 2
    • 8
  • k

    kbanta11

    04/14/2022, 8:33 PM
    I keep getting an
    Error confirming user
    with a 500 status when trying to use
    verifyOTP
    (this used to work, but today isnt). Has anyone else been experiencing this?
  • g

    garyaustin

    04/14/2022, 9:56 PM
    I have a verifyOTP test setup and just ran it on a new user to success.
  • k

    kbanta11

    04/14/2022, 9:57 PM
    it used to work but suddenly stopped for me
  • k

    kbanta11

    04/14/2022, 9:57 PM
    i get a different error if the verify code is wrong or of the phone number is wrong/doesn't exist
    g
    • 2
    • 30
  • n

    nikivi

    04/15/2022, 2:07 AM
    https://supabase.github.io/supabase-js/
  • n

    nikivi

    04/15/2022, 2:07 AM
    is there a doc on this library
1...565758...81Latest