Started on the database
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { SECRET_JWT_KEY } from '$env/static/private'
|
||||
import { fail, redirect } from '@sveltejs/kit'
|
||||
import { genSaltSync, hashSync } from 'bcrypt-ts'
|
||||
import type { PageServerLoad, Actions } from './$types'
|
||||
|
||||
export const load: PageServerLoad = async ({ url }) => {
|
||||
const redirectLocation = url.searchParams.get('redirect')
|
||||
return { redirectLocation }
|
||||
}
|
||||
|
||||
export const actions: Actions = {
|
||||
signIn: async ({ request, cookies }) => {
|
||||
const formData = await request.formData()
|
||||
const { username, password, redirectLocation } = Object.fromEntries(formData)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user