minimally made
This commit is contained in:
@@ -1,3 +1,18 @@
|
|||||||
export default defineEventHandler((event) => {
|
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 })
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user