d33pu
05/08/2022, 12:28 PMNiFTiChristian
05/08/2022, 3:01 PMFoxmind1
05/08/2022, 9:58 PMCipherCode
05/08/2022, 11:34 PMyxsh
05/09/2022, 3:10 AMsupabase.auth.user()
doesnβt return a Promise, and returns null before it retrieves the sessionβmaking it hard to determine what the login state is.Nander
05/09/2022, 7:16 AMsql
-- should return nothing
select * from connections
-- should return the row where id = 1234
select * from connections where id = 1234
I know that I can compare things like the auth data (auth.email() for example) to values, but is that also possible with where parameters?pocin
05/09/2022, 7:29 AMZozo
05/09/2022, 9:32 AMSteve
05/09/2022, 9:46 AMjs
const [song, setSong] = useState(
() => JSON.parse(localStorage.getItem("song")) ?? ninteenOne
);
useEffect(() => {
localStorage.setItem("song", JSON.stringify(song));
(async () => {
const { data, error } = await supabase
.from("song")
.upsert({ id: 1, slug: song });
console.log(JSON.parse(data[0].slug));
})();
}, [song]);
sandbox - https://codesandbox.io/s/friendly-poincare-ke7j6m?file=/src/App.jsxdonpuerto
05/09/2022, 10:49 AMSovak
05/09/2022, 11:41 AMLudvig
05/09/2022, 12:13 PMsql
CREATE FUNCTION test_function(products_object_array_input some_data_type) -- what should the data type be? array? jsonb[]?
An array of objects that I would pass into the function could look like this:
json
[
{ "productID": 3, "quantity": 5 },
{ "productID": 1, "quantity": 2 }
]
First question: What should I set the products_object_array_input data type as? array? jsonb[]?
Second question: I then want to loop over the array to insert the values of the object array. Again, using plpgsql. How?
sql
-- I want to loop over cart_array_input and do this for every object in the array. Sorry for pseudo-code. i = iterator
insert into order_item(product_id, quantity)
values(products_object_array_input[i].productID, products_object_array_input[i].quantity);
YelloJello
05/09/2022, 2:56 PMkevin4dhdMobile
05/09/2022, 3:15 PM(d,f,g)=> π₯
05/09/2022, 4:36 PMawait supabase.auth.signIn({ provider: 'twitter' })
in my app, but instead of a "login with twitter" page as id expect, my browser gets sent to my supabase root urlceleronCoder
05/09/2022, 6:20 PMpedrodiaz
05/09/2022, 8:31 PMOron
05/09/2022, 8:39 PMadriantoddross
05/09/2022, 8:52 PMgeordi
05/09/2022, 9:02 PMawait supabaseClient.auth.signIn({
provider: "twitter",
},
{
redirectTo: "http://localhost:3000/app"
});
and in my Additional redirect URLs settings:
http://localhost:3000/app
I wasn't sure if it could be the # symbol appended on the URL that has the access_token param after it, so tried a few ways of hard-coding it on the URL but to no luck. I'm using the supabase-auth-helpers package but don't think it's related to this. Help is much appreciated!Bryan K.
05/09/2022, 11:50 PMJuan Zapata Gomez
05/10/2022, 12:35 AMError: pgbouncer cannot connect to server
Not sure why this is occurring and forces me to restart the server. Any help would be appreciatedarcavid
05/10/2022, 8:47 AMabc222
05/10/2022, 9:01 AMekko
05/10/2022, 12:57 PM{
"id": 1,
"foreign": [
{
"id": 1
}
]
}
to
```
{
"id": 1,
"foreign": {
"id": 1
}
}
```NicmeisteR
05/10/2022, 1:00 PM{
"message": "The schema must be one of the following: public, storage, graphql"
}
Oron
05/10/2022, 1:53 PMNeedle
05/10/2022, 2:15 PMBaoshan
05/10/2022, 4:07 PMTLS connection failed with message: invalid peer certificate contents: invalid peer certificate: UnsupportedCertVersion
Defaulting to non-encrypted connection
Sending fatal alert BadCertificate
Paul
05/10/2022, 8:00 PM