javorszky
02/17/2022, 9:17 AMsilentworks
02/17/2022, 9:51 AMmalaleche
02/17/2022, 2:16 PMawait supabase
.from('credits')
.update({credits: 'credits - 1'})
.eq('acc_id', '35')
Eidur
02/17/2022, 2:30 PMys
02/17/2022, 2:33 PM'credits - 1'
you just put in your updated variable. Not sure if this is the right way, pretty new with this, but that's how I'd go about doing it.malaleche
02/17/2022, 2:37 PMys
02/17/2022, 2:38 PMmalaleche
02/17/2022, 2:57 PMmalaleche
02/17/2022, 2:57 PMSoko
02/17/2022, 3:52 PMuser
02/17/2022, 6:32 PMcdro
02/17/2022, 8:01 PMawait supabase
.from<definitions['pass']>('pass')
.select(
'id, json',
{
count: 'exact',
}
)
.lt('json->expirationDate', new Date(now).toISOString().toLocaleString())
Error:
{
message: 'invalid input syntax for type json',
code: '22P02',
hint: null,
details: 'Token "-02" is invalid.'
}
ragokan
02/17/2022, 8:08 PMragokan
02/17/2022, 8:23 PMuser
02/17/2022, 8:34 PMcookie mob
02/17/2022, 8:39 PMThomas van Broekhoven
02/17/2022, 8:42 PMaquaspirit
02/17/2022, 10:35 PMjs
const handleGoogleAuth = () => {
supabase.auth.signIn(
{
provider: 'google',
},
{
redirectTo: 'https://foo.com/dashboard',
},
);
};
// ...
button.onclick = handleGoogleAuth // fire signIn
// ... route to Dashboard
// Dashboard page
const Dashboard () => {
return <div><h1>Dashboard</h1></div>
}
export const getServerSideProps: GetServerSideProps = async ({ query, req }) => {
// req.cookie is empty object
const { user, token } = await supabase.auth.api.getUserByCookie(req);
// user and token are null, but that's because req.cookie is empty object
return {
props: {},
};
};
export default Dashboard
Nafets
02/17/2022, 11:27 PMsilentworks
02/18/2022, 10:08 AMsilentworks
02/18/2022, 10:25 AMZozo
02/18/2022, 11:43 AMsupabase.auth.signIn(
{provider: 'azure'},
{
scopes: 'email',
redirectTo:
'https://login.microsoftonline.com/<tenantid>/oauthz/v2.0/authorize'});
notice I replaced the common
with my tenant-id <tenantid>
but when I try to sign it I end up with :
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=xxxxredirect_uri=xxxx.supabase.co%2Fauth%2Fv1%2Fcallback&response_type=code&scope=openid+email&
anyone done something similar before?Lothar
02/18/2022, 4:13 PMNet
02/18/2022, 4:50 PMUnyxos
02/18/2022, 4:54 PMNet
02/18/2022, 5:02 PMragokan
02/18/2022, 5:41 PMragokan
02/18/2022, 5:42 PMragokan
02/18/2022, 5:42 PMLothar
02/18/2022, 6:44 PMsupabase
.from('ingredient-prints')
.select(`token,
ingredients(key)
`)
.in('token', tokenIds)
i'm getting back this response:
{
token: '3YXoTg2JT6Qb9m4P6wd2FYP9fFUoeTCt4KLK6BmpsFgf',
ingredients: { key: 'doom-chalice-holo' }
}
Is there a way to get them like this?
{
token: '3YXoTg2JT6Qb9m4P6wd2FYP9fFUoeTCt4KLK6BmpsFgf',
key: 'doom-chalice-holo'
}
(basically making the joint table column be at the same level)