login almost complete

This commit is contained in:
2026-01-14 17:31:53 +00:00
parent dc2d7111dd
commit e8d6557e58
5 changed files with 56 additions and 60 deletions

View File

@@ -1,7 +1,12 @@
export default defineEventHandler(async (event) => {
const conf = useRuntimeConfig()
const body = await readBody(event)
const req = await fetch("http://127.0.0.1:99",
if ( !body.email || !body.password )
throw createError({ statusCode: 400, message: "Bad form. Use e-mail and password" })
const req = await fetch(conf.fastapi_url + "/login",
{
method: "POST",
headers: {