fix: update Dockerfile and remove .next from git

This commit is contained in:
2026-01-14 18:49:57 +00:00
parent 91fc911523
commit ed2c303d6f
252 changed files with 1537 additions and 10866 deletions

45
app/login/actions.ts Normal file
View File

@@ -0,0 +1,45 @@
'use server'
import { revalidatePath } from 'next/cache'
import { redirect } from 'next/navigation'
import { createClient } from '@/utils/supabase/server'
export async function login(formData: FormData) {
const supabase = await createClient()
const email = formData.get('email') as string
const password = formData.get('password') as string
const { error } = await supabase.auth.signInWithPassword({
email,
password,
})
if (error) {
redirect('/login?error=Could not authenticate user')
}
revalidatePath('/', 'layout')
await supabase.rpc('reactivate_profile')
redirect('/app')
}
export async function signup(formData: FormData) {
const supabase = await createClient()
const email = formData.get('email') as string
const password = formData.get('password') as string
const { error } = await supabase.auth.signUp({
email,
password,
})
if (error) {
redirect('/login?error=Could not authenticate user')
}
revalidatePath('/', 'layout')
redirect('/app')
}