https://supabase.com/ logo
Join Discord
Powered by
# off-topic
  • c

    copple

    11/23/2021, 7:07 AM
    also found the bug which affected you @User - deploying now
  • j

    john654

    11/23/2021, 7:08 AM
    https://tenor.com/view/youre-welcome-ure-welcome-my-pleasure-no-problem-your-wish-is-my-command-gif-16335689
  • j

    john654

    11/23/2021, 7:09 AM
    Appreciate the qq response. You guys are doing a great job 😉
  • a

    anothercoder

    11/23/2021, 7:50 AM
    There is a bug in "Create a policy from a template" from clicking on the 3 different "New policy" buttons in the Storage policies. The templates arent refreshed properly.
  • t

    Tiger Abrodi 🐆

    11/23/2021, 9:26 AM
    I'm curious, if I want to get a user and their metadata based on the user's id, is this possible?
  • t

    Tiger Abrodi 🐆

    11/23/2021, 9:26 AM
    In firebase we'd have to create a users collection, and store more data there, I'm wondering if I can immediately get the auth users as well as their meta data?
  • a

    almkamberi

    11/23/2021, 9:27 AM
    Hi there! Just wanted to ask about how do you handle user roles in supabase postgres. Admin, simple user, middle type of use and others.
  • t

    Tiger Abrodi 🐆

    11/23/2021, 9:32 AM
    Yeah, it doesn't seem to be possible: https://nikofischer.com/supabase-how-to-query-users-table I guess when creating a user I will also create a users table with the user in there and its information. Likely set the id to it from the auth.user.id 👍
  • t

    Terry

    11/23/2021, 10:30 AM
    Is there a way to do multiple
    .eq
    on the same field?
  • t

    Terry

    11/23/2021, 10:31 AM
    I have values from 1-5 stored, so my query would look like:
  • t

    Terry

    11/23/2021, 10:31 AM
    .eq(css, 4).eq(css, 2).eq(css, 5)
  • t

    Terry

    11/23/2021, 10:31 AM
    Is there some kind of
    .eq(css, [4,2,5])
    syntax?
  • l

    letourpowerscombine

    11/23/2021, 11:04 AM
    I'm getting
    "FetchError: XMLHttpRequest is not defined"
    when making calls to a SvelteKit endpoint, that sends request to Supabase. Everything works as expected in local development, but fails in deployment on Cloudflage Pages. I also noticed this issue, https://github.com/supabase/supabase-js/issues/154, which seemed like it might be relevant. I tried doing the
    createClient
    with a defined fetch method — but I'm still encountering the error. Here's the function that requests the endpoint:
    Copy code
    javascript
        async function submitForm(e) {
            var formData = new FormData(e.target);
    
            formData.append('loaded_address', loaded_address);
            formData.append('address', address);
    
            const response = await fetch(`./submitform`, {
          method: 'post',
          body: formData
        })
            response.ok ? ( form_submit = "success" ) : (form_submit = "error" )
    
        }
    And here's the
    submitform
    endpoint, which requests to Supabase:
    Copy code
    javascript
    // import supabase from "$lib/db"
    import { variables } from '$lib/variables';
    
    import { createClient } from '@supabase/supabase-js'
    
    const supabase = createClient( import.meta.env.VITE_SUPABASE_URL,
        import.meta.env.VITE_SUPABASE_ANON_KEY, { fetch: fetch })
    
    export async function post(request) {
    
    const {data, error} = await supabase
    .from('support_responses')
    .insert({support_info: request.body.get('support_info'), introduction: request.body.get('introduction'), contact: request.body.get('contact'), loaded_location: request.body.get('loaded_address'), searched_location: request.body.get('address')})
    
    if (error) {
    return {
        status: 500,
        body: error
      }
    }
    else {
    
    return {
        status: 200,
        body: {
          data
        }
      }
    }
    
    }
  • a

    anothercoder

    11/23/2021, 11:06 AM
    Can try these: https://supabase.com/docs/reference/javascript/or https://supabase.com/docs/reference/javascript/in
  • t

    Terry

    11/23/2021, 11:44 AM
    ooooh sweet! Thank you @User !
  • l

    letourpowerscombine

    11/23/2021, 12:32 PM
    Specifically, if
    customFetch = someFunction()
    , I'm trying to understand what is
    someFunction()
    to make this work
  • a

    Adi

    11/23/2021, 12:55 PM
    Anyone here implemented multi tenancy with supabase? Is it even possible? Any resources available for reference?
  • b

    batoms

    11/23/2021, 1:27 PM
    Where should I report issues about the Supabase website? e.g. This returns no results: https://supabase.com/docs/search?q=supabase+link
  • b

    batoms

    11/23/2021, 1:37 PM
    It should be possible if you create an
    organizations
    or
    tenants
    table and all of your other tables include a foreign key to tenant table. You would then use row level security and set up a PG policy to filter the results based on which tenant(s) the user is a member of.
  • b

    benjick

    11/23/2021, 1:51 PM
    > Serverless functions coming soon Any timeframe on this? Shopping for frameworks 😇
  • j

    john654

    11/23/2021, 2:08 PM
    https://supabase.com/docs/reference/javascript/auth-signup I think you actually can, by adding data during sign up. But I would say that a best practice is to have a separate table for additional info
  • a

    Adi

    11/23/2021, 2:09 PM
    Just curious to know how are you handling migrations in supabase?
  • t

    Tiger Abrodi 🐆

    11/23/2021, 2:24 PM
    idk, im not doing any migrations
  • t

    Tiger Abrodi 🐆

    11/23/2021, 2:24 PM
    ye i think so too, 👍
  • t

    Tiger Abrodi 🐆

    11/23/2021, 2:40 PM
    I'm curious why I can sign up with the same email?
  • t

    Tiger Abrodi 🐆

    11/23/2021, 2:40 PM
    or am I missing something?
  • t

    Tiger Abrodi 🐆

    11/23/2021, 2:47 PM
    ait
  • t

    Tiger Abrodi 🐆

    11/23/2021, 2:47 PM
    im handling it via users instead, gotta check it somehow
  • t

    Tiger Abrodi 🐆

    11/23/2021, 2:47 PM
    the email is unique
  • c

    chipilov

    11/23/2021, 2:49 PM
    check this GitHub issue: https://github.com/supabase/supabase-js/issues/296
1...141142143...392Latest