Gitanes
02/25/2023, 5:30 PM[Error] TypeError: Module specifier, '@supabase/supabase-js' does not start with "/", "./", or "../". Referenced from http://localhost:8888/home/
<script type="module">
import {createClient} from '@supabase/supabase-js'
Daniel Netzer
02/25/2023, 6:48 PMmissing state parameter
Did anyone tried to do the same setup and had better luck?kevlust
02/25/2023, 7:27 PMJubilantJam
02/25/2023, 8:12 PMAtrox
02/25/2023, 8:24 PM<body>
. This makes styling unnecessarily difficult and prevents using any kind of custom metadata or web fonts.Kuba
02/25/2023, 8:44 PM,.WuxplAa3CDo!Z^wKofi*c%0+yQ(6q|(~#GWJKe)4hn4Jj:k'
as a new password, it was validated as strong
, but clicking on Reset password
brought me an error:
Failed to reset password
Generating a new password from the modal worked, but it's much less secure password that what I would like to use.
Moreover, I had the same password as the one above in the beginning, when I was setting up a database, just with one different character and there was no issue.
PS. Yes, I'm aware I disclosed my password. It's changed, so it isn't a big deal.BraverElliot.eth
02/25/2023, 8:45 PMxdotcommer
02/25/2023, 8:46 PMMacpire
02/25/2023, 8:47 PMQuery:
const product = await client.from('product').select('id, productTag!inner(tag)').in('productTag.tag', [20, 57])
Output:
data: [
{ id: 32, productTag: [ { tag: 20 }, { tag: 57 } ] },
{ id: 33, productTag: [ { tag: 20 } ] }
],
I prefer not to filter this list on JS based on productTag count after getting all products :/
Thank you!Kuba
02/25/2023, 9:57 PMjs
const { data } = await supabase
.from("questions")
.select("*", { count: "exact", head: true })
.eq("quiz_id", quizData.id);
// result: null
while this returns an object that contains the desired result of counting the results:
js
const { data } = await supabase
.from("questions")
.select("count")
.eq("quiz_id", quizData.id)
.single();
// result: { count: 2 }
The first code is literally the code from the docs, so why it does return null
?oldwired
02/25/2023, 10:11 PMimagio
02/25/2023, 10:46 PMDYELbrah
02/26/2023, 12:28 AMconst { data, error } = await ctx.supabase
.from("customer_transaction")
.select("id, customer(business_name)")
.eq("id", id)
.single();
if (error) {
throw error;
}
return data;
When I try to access the data I'm doing:
fetchedTransaction.customer?,business_name
I get an error:
Property 'business_name' does not exist on type '{ business_name: string | null; } | { business_name: string | null; }[]'.
Property 'business_name' does not exist on type '{ business_name: string | null; }[]'.ts(2339)
Actual Left Shark
02/26/2023, 12:52 AMjdgamble555
02/26/2023, 1:03 AMtags
- name
- pid (short for post_id)
(fk = name + pid)
posts
- id
- title
- content
(all posts have minimum of 3 tags)
...
Function:
ts
create function get_related_posts(post_id uuid)
returns setof posts
language plpgsql
as $$
begin
return query
select
... (code here)
posts.id = $1;
end;$$;
Looking to create a function get_related_posts, which lets me get the related posts by tag like so:
- grab all posts with all 5 tags in common (if 5 tags)
- grab all posts with any 4 tags in common (if 4 tags)
- grab all posts with any 3 tags in common (if 3 or less tags)
- grab all posts with any 2 tags in common
- grab all posts with one tag in common
And then I could limit those results on the front end.
Can't wrap my head around this...
Jn00t
02/26/2023, 1:10 AMAll table's elements must be unique
Even if I remove all columns except an id column.
See image
Feels like I tried everythingjinsley8
02/26/2023, 2:22 AMlecookie
02/26/2023, 3:45 AMpakkerr
02/26/2023, 4:30 AMAmr
02/26/2023, 10:58 AMseed.sql
so that I can safely reset the database after each migration?
It's not very important, just a nice to have while local developingchrtravels
02/26/2023, 11:08 AMdoğukan
02/26/2023, 11:31 AMDoDo
02/26/2023, 12:33 PMDevThoughts
02/26/2023, 1:24 PMuseEffect(() => {
supabase.auth.onAuthStateChange(async (event, session) => {
if (event == "PASSWORD_RECOVERY") {
const newPassword = prompt("What would you like your new password to be?");
const { data, error } = await supabase.auth
.updateUser({ password: newPassword })
if (data) alert("Password updated successfully!")
if (error) alert("There was an error updating your password.")
}
})
}, [])
My protected routes looks like this Session ? <App /> : <Login />
every time when i click on the mail link my app gets logged in instead of coming to reset-password route, i guess reset password link has an token=. My app is vite create react app.sovereign
02/26/2023, 1:25 PMajdavies
02/26/2023, 1:36 PMFlyte
02/26/2023, 1:44 PMamyp
02/26/2023, 1:57 PMalana
02/26/2023, 2:12 PMamyp
02/26/2023, 2:19 PM