Sorio
Sorio
Explore posts from servers
NNuxt
Created by Sorio on 7/27/2024 in #❓・help
error with the supabase module in server side
Thank you again🙏
25 replies
NNuxt
Created by Sorio on 7/27/2024 in #❓・help
error with the supabase module in server side
To get the Database file I generate it from supabase cli with this command npx supabase gen types typescript --project-id <your-project-id> and I copy/paste it.
25 replies
NNuxt
Created by Sorio on 7/27/2024 in #❓・help
error with the supabase module in server side
import { serverSupabaseUser, serverSupabaseClient } from '#supabase/server' import { Database } from '../types/database' export default defineEventHandler(async (event) => { const user : any = await serverSupabaseUser(event) if (!user) { throw createError({ statusCode: 401, statusMessage: 'Unauthorized' }) } const client = await serverSupabaseClient<Database>(event) const body = await readBody(event) console.log(body) const id = body.id const completed = body.done if (typeof completed !== 'boolean') { throw createError({ statusCode: 400, statusMessage: 'Invalid request' }) } console.log(typeof completed) const { data } = await client.from('tasks').update({done : completed}).eq('id', id).select() return data })
25 replies
NNuxt
Created by Sorio on 7/27/2024 in #❓・help
error with the supabase module in server side
this is my final code
25 replies
NNuxt
Created by Sorio on 7/27/2024 in #❓・help
error with the supabase module in server side
Thanks.👍 Your message helped me.
25 replies
NNuxt
Created by Sorio on 7/27/2024 in #❓・help
error with the supabase module in server side
Can you help me @isakwang ?
25 replies
NNuxt
Created by Sorio on 7/27/2024 in #❓・help
error with the supabase module in server side
const test = async () => { await $fetch('/api/complete', { method: 'POST', body: { id: 0, done: true } }) }
25 replies
NNuxt
Created by Sorio on 7/27/2024 in #❓・help
error with the supabase module in server side
In my front part I call my api like this :
25 replies
NNuxt
Created by Sorio on 7/27/2024 in #❓・help
error with the supabase module in server side
When I console the body, I get my userId. And if I console.log the event object, I don't see any of my arguments.
25 replies
NNuxt
Created by Sorio on 7/27/2024 in #❓・help
error with the supabase module in server side
Why it's doesn't works ?
25 replies
NNuxt
Created by Sorio on 7/27/2024 in #❓・help
error with the supabase module in server side
No description
25 replies
NNuxt
Created by Sorio on 7/11/2024 in #❓・help
Nuxt X Supabase Oauth with Github
Thanks 👍
7 replies
NNuxt
Created by Sorio on 7/11/2024 in #❓・help
Nuxt X Supabase Oauth with Github
I don't understand because my url callback is http://localhost:3000/confirm. Should my callback url be this?
7 replies