jaf
01/10/2022, 3:52 PMSELECT * FROM test_products_2 WHERE main_sku = sku
garyaustin
01/10/2022, 3:56 PMjaf
01/10/2022, 4:00 PMTremalJack
01/11/2022, 1:25 PMTremalJack
01/11/2022, 1:27 PMeMeRiKa
01/11/2022, 1:31 PMeMeRiKa
01/11/2022, 1:36 PMdrex
01/11/2022, 6:33 PMdrex
01/11/2022, 6:36 PMdrex
01/11/2022, 6:36 PMjesucrypto
01/11/2022, 7:37 PMjesucrypto
01/11/2022, 7:38 PMsilentworks
01/11/2022, 7:54 PMstibbs
01/12/2022, 6:44 AMjaf
01/12/2022, 11:56 AMdata
and a body
property with exactly the same values in it. What's the reason for this?dohman
01/12/2022, 8:20 PMjs
rejectEntry: async function(item) {
let index = this.items.indexOf(item);
this.items.splice(index, 1);
const deleteEntry = await supabase
.from('submissions')
.delete()
.match(item.id)
if (deleteEntry.error) throw deleteEntry.error;
},
Can anyone suggest what was wrong? I assumed that .match would match the item ID from the table and remove that.dohman
01/12/2022, 8:24 PMjs
const deleteEntry = await supabase
.from('submissions')
.delete()
.eq('id', item.id)
silentworks
01/12/2022, 9:20 PMHaba
01/12/2022, 10:09 PMconst {data, error} = await supabase.from('Cards').select('*').eq('device:device->brand',this.searchDBValue)
or
const {data, error} = await supabase.from('Cards').select('*').eq('device.brand',this.searchDBValue)
My
Cards
..
device:{
brand..
}
..
Ekky
01/13/2022, 1:47 AMsh
# Cards Table
| id | device |
|---------|--------------------------|
| 1 | {"brand":"visa"} |
| 2 | {"brand":"mastercard"} |
Then your data query should look like this
js
// this.searchDBValue = "visa"
const { data, error } = await supabase.from('Cards').select('*').eq("device->brand", this.searchDBValue);
// data = { id : 1, device: "{\"brand\":\"visa\"}" }
Give that a try maybe?Julien
01/13/2022, 10:13 AMflorian-lefebvre
01/13/2022, 5:28 PMnuxt-supabase
module or equivalent since you need a server middleware, and nuxt context is not available in it (but you can still inject a supabase client instance from yours)
2. You need a server middleware that works like https://github.com/supabase/supabase/blob/master/examples/nextjs-with-supabase-auth/pages/api/auth.js
3. You need to listen to auth state change using supabase.auth.onAuthStateChange
I don't remember anything else but this should help you to get startedflorian-lefebvre
01/13/2022, 5:28 PMJulien
01/14/2022, 9:03 AMdarklord
01/14/2022, 10:35 AMsilentworks
01/14/2022, 12:03 PMMike92988
01/14/2022, 2:44 PMjaf
01/15/2022, 11:23 AMchipilov
01/15/2022, 2:03 PMDevThoughts
01/15/2022, 3:51 PM// check if email is valid and exists in database (if not, show error) otherwise send magic link
const [email, setEmail] = React.useState('');
async function handleSubmit(event) {
event.preventDefault();
if (email.length > 0 && supabase.auth.user()?.email === email) {
console.log('send magic link');
return await supabase.auth.signIn({ email });
} else {
console.log('invalid email');
throw new Error('Email not verified');
}
}