status -> statusCode
This commit is contained in:
@@ -4,7 +4,7 @@ export default defineEventHandler(async (event) => {
|
||||
|
||||
const body = await readBody(event)
|
||||
if (body.new_pw !== body.confirm_new_pw)
|
||||
throw createError({status:400, message: "Passwords don't match!"})
|
||||
throw createError({statusCode: 400, statusMessage: "Passwords don't match!"})
|
||||
|
||||
const session = await getUserSession(event)
|
||||
const config = await useRuntimeConfig(event)
|
||||
@@ -35,7 +35,7 @@ export default defineEventHandler(async (event) => {
|
||||
new URLSearchParams({ id: userId }))
|
||||
if (!current_r.ok)
|
||||
if (current_r.status == 404)
|
||||
throw createError({status: 404, message: "User doesn't exist"})
|
||||
throw createError({statusCode: 404, statusMessage: "User doesn't exist"})
|
||||
|
||||
await $fetch(config.fastapi_url + "/changepw", {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user