Started on the database

This commit is contained in:
Eclypsed
2024-01-23 01:21:41 -05:00
parent fd489b055c
commit 830ab55023
9 changed files with 528 additions and 37 deletions

View File

@@ -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)
},
}