https://supabase.com/ logo
Join Discord
Powered by
# help
  • u

    '"X.png

    01/27/2022, 1:29 AM
    hello guys I created a project in subase and it's been more than 40 minutes since it's been in the building and is that normal?
  • g

    garyaustin

    01/27/2022, 2:25 AM
    No. Usually a minute or two.
  • g

    garyaustin

    01/27/2022, 2:29 AM
    Tenant_ID in Supabase storage
  • d

    Dong

    01/27/2022, 3:21 AM
    Hi, Is there anyway to do this use supabasejs ? basically the the tenant has the foreign key to property table. I'm able to get the tenants, but I just want the first one or return single one. This is not working. Thanks
    Copy code
    ts
    supabase
        .from(TABLE_NAMES.PROPERTY)
        .select(
          `id,title,tenant(name)&tenant.limit=1`
        );
  • m

    mitul

    01/27/2022, 4:06 AM
    When pulling data from storage, is there no way to have a modifier? ie. pull all uploads where owner_id matches user_id
  • c

    cory882

    01/27/2022, 6:54 AM
    Encountering the same issue. Did you find a solution?
  • w

    wiesson

    01/27/2022, 8:59 AM
    Does anyone know If I can listen to multiple conditions the same time? https://supabase.com/docs/reference/javascript/subscribe#listening-to-row-level-changes
    Copy code
    const mySubscription = supabase
      .from('countries:id=eq.200')
      .on('UPDATE', handleRecordUpdated)
      .subscribe()
  • w

    wiesson

    01/27/2022, 9:01 AM
    I'd like to listen to two conditions:
    products:id=eq.1234,products:rootId=eq.1234
    so I get all products with all variants, but I don't understand the syntax here šŸ¤·ā€ā™‚ļø I tried to use an
    or
    but I'm not sure if the syntax is the same as for filters for a select query?
    g
    • 2
    • 4
  • i

    imtiaz

    01/27/2022, 10:30 AM
    is there any way to host a facebook messenger app on supabase? it requires setting up a webhook that can accept post requests. any postgres extension that could help? i know about pg_http but that can only sends messages but probably not receive
  • k

    Kilian

    01/27/2022, 1:15 PM
    according to the postgresql docs there's a "numeric" column type, but in the supabase UI I can only select float4 and float8. Why is that different?
  • m

    Markido

    01/27/2022, 1:18 PM
    I am sending an update request to my API, but i keep getting 404 not found. However, if i change the request type to a get request, i definitly get the record back im trying to modify. Any ideas?
  • c

    chipilov

    01/27/2022, 1:20 PM
    Maybe you have an RLS which does NOT allow modifying for the relevant user?
  • m

    Markido

    01/27/2022, 1:21 PM
    Then it should give me a 403 event violates row level security, like with other events :/
  • c

    chipilov

    01/27/2022, 1:21 PM
    Most likely, because they have NOT exposed it through the UI. You can open an issue for that on GitHub, in the meantime, you can still create a numeric column, you just need to define your table in SQL through the SQL editor
  • m

    Markido

    01/27/2022, 1:21 PM
    And i think it is indeed because of my RLS, but i don't get why its a 404 ^^
    c
    • 2
    • 27
  • k

    Kilian

    01/27/2022, 1:27 PM
    Thanks. I need to edit an existing table though. Was hoping to do that through the UI as the postgres user in pgadmin4 doesn't have enough rights (and somehow assigning those rights per https://github.com/supabase/supabase/discussions/4825 doesnt work)
    c
    • 2
    • 6
  • r

    ricardodepaula

    01/27/2022, 2:48 PM
    man, this community is very inactive
  • r

    ricardodepaula

    01/27/2022, 2:48 PM
    where is the life here?
  • g

    garyaustin

    01/27/2022, 4:01 PM
    Realtime and filters
  • g

    garyaustin

    01/27/2022, 4:14 PM
    Count in api request
  • g

    garyaustin

    01/27/2022, 4:14 PM
    Have you seen count used in the select fields documented or used somewhere? I don't recall seeing that as an option. You probably have to use a view or rpc call unless you have seen this somewhere.
    p
    • 2
    • 6
  • j

    jbergius

    01/27/2022, 6:46 PM
    Hey guys! My side project, which is a Nextjs + Supabase app, is getting some attraction, which of course is very fun, but also puts me in to situations I've never been before. I have a table called
    payslips
    , which is just a table that holds all payslips that has been sent through my app. Every payslip is connected to a specific company through a
    integrator_key
    which also can be found in the companies table. I do all my queries to the payslips table through a protected API Route and not from the client. So right now I've only enabled RLS, but don't make use of any policy. My query looks like this atm:
    Copy code
    const { data: payslipsData, error } = await supabaseAdmin          .from('payslips')
    ​.select('*')
     .eq('integrator_key', integratorKey);
    Questions: - Is this the best and fastest query I can use? I don't want to make this call on client side, as I also fetch data from an external API at the same time, and merge together with the data from Supabase. - Do I have any benefits from using the
    integrator_key
    as a foreign key to the
    companies
    table? Right now that isn't set up, don't really ask me why.
  • g

    gattaca

    01/27/2022, 7:08 PM
    why does the signup email prefix the access_token info with # instead of '?'
  • g

    gattaca

    01/27/2022, 7:09 PM
    the nextjs router can't extract the query string info with a # prefix, how can I change it to '?'?
  • b

    brandymarsh

    01/27/2022, 7:26 PM
    you can do something like
    Copy code
    const fragments = new URLSearchParams(window.location.hash.substr(1))
    const accessToken = fragments.get('access_token')
  • g

    gattaca

    01/27/2022, 7:27 PM
    thanks, but out of curiosity, why hashtag instead of questionmark, isn't it the common thing to do?
  • b

    brandymarsh

    01/27/2022, 7:31 PM
    for this kind of client-side authorization, using a fragment (the hashtag) like that avoids exposing the token to the server. if it was a query parameter after a question mark, the token would be exposed to the server
  • g

    gattaca

    01/27/2022, 7:31 PM
    Do you happen to know if it is still changeable?
  • s

    Scott P

    01/27/2022, 7:33 PM
    The functionality can't be configured, but if you have the full URL available,
    url.replace('#', '?')
    and then parsing the result of that (using whatever URL parsing library you prefer) will get you the params
  • z

    Ziga

    01/27/2022, 9:44 PM
    Hi guys, if someone can help me out on this one it would be much appreciated. I am having issues with storing extra data on sign up from auth to public users table. On sign up i send extra data as:
    Copy code
    const { error, user } = await signUp(
        { 
          email, 
          password,
        }, 
        {
          data: { 
            accountType
          }
        });
    i am using this trigger function to add user to public table
    Copy code
    create or replace function public.handle_new_user() 
    returns trigger as $$
    begin
      insert into public.users (id, username, email, avatar_url)
      values (new.id, new.raw_user_meta_data ->> 'full_name', new.email, new.raw_user_meta_data ->> 'avatar_url');
      return new;
    end;
    
    $$ language plpgsql security definer;
    
    -- 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();
    Since the extra data is stored in auth user as user_metadata, how can i modify the upper trigger function to add this data in public users table. Thanks
    s
    • 2
    • 1
1...205206207...316Latest