login almost complete
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user