https://supabase.com/ logo
Join DiscordCommunities
Powered by
# help
  • l

    lesssummer

    10/25/2021, 2:55 AM
    i get this
    Copy code
    {"code":500,"msg":"Error confirming user","error_id":"49602fde-488e-4910-aa34
    since last night
  • w

    wiesson

    10/25/2021, 7:49 AM
    Where can I submit a bug issue for the supabase storage "editor"? It is minor but annoying. If I create a new storage folder, enter a name and hit enter in Safari, the whole page reloads instead of creating the folder. I guess, there is a ev.preventDefault() or sth like this missing (?)
  • v

    VuNguyen

    10/25/2021, 8:52 AM
    maybe github?
  • v

    VuNguyen

    10/25/2021, 8:52 AM
    I have a query like this
    Copy code
    js
      const { data, error } = await supabase
        .from("anime")
        .select(
          "title->userPreferred, recommendations!original_id(recommendations:recommend_id(*))"
        )
        .limit(1)
        .single();
    it returns
    Copy code
    json
    {
      userPreferred: 'Dragon Quest: Dai no Daibouken',
      recommendations: [
        { recommendations: [Object] },
        { recommendations: [Object] },
        { recommendations: [Object] }
      ]
    }
    The expected output is
    Copy code
    json
    {
      userPreferred: 'Dragon Quest: Dai no Daibouken',
      recommendations: [
        [Object],
        [Object],
        [Object]
      ]
    }
    What should I do, thanks
  • h

    HarryET

    10/25/2021, 9:31 AM
    Hey! I have this plpgsql function:
    Copy code
    sql
    CREATE OR REPLACE FUNCTION public.events_http_send_message_event(event_id uuid, dispatch_event_type event_type, bot bot_members, message messages)
        RETURNS http_client_response AS
    $$
    DECLARE
        res     http_client_response;
        headers http_header[];
    BEGIN
        SELECT
               public.events_http_headers(event_id, bot)
        INTO headers;
    
        SELECT status, content_type, content::json->>'data' AS data, content::json->>'type' as type
            FROM http((
                       'POST',
                       bot.interactions_url,
                       headers,
                       -- Removed for brefiety
                )::http_request
            ) INTO res;
    
        RETURN res;
    END;
    $$ LANGUAGE plpgsql;
    But it gives me this error,
    Copy code
    invalid input syntax for type integer: \"(200,\"application/json; charset=utf-8\",,)\"
    Any help would be awesome!
    c
    • 2
    • 36
  • v

    VuNguyen

    10/25/2021, 9:53 AM
    Seems no one really active...
  • h

    HarryET

    10/25/2021, 9:54 AM
    I'm not sure you can do that
  • h

    HarryET

    10/25/2021, 9:54 AM
    as you have to reference a key to the forign key
  • h

    HarryET

    10/25/2021, 9:54 AM
    you could do it in code after you get the values but im not sure thats what you want?
  • v

    VuNguyen

    10/25/2021, 9:54 AM
    well i think i have to
    .map
    it in client
  • h

    HarryET

    10/25/2021, 9:54 AM
    yeah thats what i was going to suggest
  • v

    VuNguyen

    10/25/2021, 9:55 AM
    well thats okay but if there anyway to get that result directly would be awesome
  • v

    VuNguyen

    10/25/2021, 9:55 AM
    thanks anyway
  • h

    HarryET

    10/25/2021, 9:55 AM
    np
  • v

    VuNguyen

    10/25/2021, 9:56 AM
    btw is there anyway to create a custom method to supabase?
  • h

    HarryET

    10/25/2021, 9:56 AM
    on the js client or in the database?
  • v

    VuNguyen

    10/25/2021, 9:57 AM
    client
  • v

    VuNguyen

    10/25/2021, 9:57 AM
    Copy code
    js
      const { data, error } = await supabase
        .from("anime")
        .select(
          "title->userPreferred, recommendations!original_id(recommendations:recommend_id(*))"
        )
        .limit(1)
        .single()
        .map(); // Custom method
  • v

    VuNguyen

    10/25/2021, 9:57 AM
    something like this
  • h

    HarryET

    10/25/2021, 9:57 AM
    maybe this? https://supabase.io/docs/reference/javascript/rpc
  • h

    HarryET

    10/25/2021, 9:58 AM
    no. can't do that
  • v

    VuNguyen

    10/25/2021, 9:58 AM
    is it sql language ?
  • h

    HarryET

    10/25/2021, 9:58 AM
    what?
  • v

    VuNguyen

    10/25/2021, 9:58 AM
    rpc thing
  • h

    HarryET

    10/25/2021, 9:58 AM
    yeah you write a postgres function then run it in the client
  • v

    VuNguyen

    10/25/2021, 9:58 AM
    oh
  • v

    VuNguyen

    10/25/2021, 9:58 AM
    seems i have to learn it cuz i dont know it
  • u

    user

    10/25/2021, 10:19 AM
    Hi, I'm brand new on supabase, and I was wondering if there was any way to change the database password ?
  • h

    HarryET

    10/25/2021, 10:20 AM
    https://supabase.io/docs/guides/database#resetting-your-project-password
  • u

    user

    10/25/2021, 10:20 AM
    God i'm so dumb, I just didn't see it... thanks !
1...115116117...316Latest