Files
yt2mp3/server/routes/login.post.ts
2026-01-13 19:51:21 +00:00

18 lines
479 B
TypeScript

export default defineEventHandler(async (event) => {
const body = await readBody(event)
const req = await fetch("http://127.0.0.1:99",
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
email: body.email!,
pwd: body.password!,
})
}
)
if (!req.ok) throw createError({ statusCode: req.status })
})