fix: explicitly set status code

zio/stable
Daniel Roe 2022-11-27 18:07:06 +00:00
parent 6414f2a4e2
commit 0192d3eeb7
No known key found for this signature in database
GPG Key ID: 22D5008E4F5D9B55
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ export default defineEventHandler(async (event) => {
const app = await getApp(HOST_DOMAIN, server) const app = await getApp(HOST_DOMAIN, server)
if (!app) { if (!app) {
setResponseStatus(400) event.node.res.statusCode = 400
return `App not registered for server: ${server}` return `App not registered for server: ${server}`
} }

View File

@ -6,7 +6,7 @@ export default defineEventHandler(async (event) => {
const app = await getApp(HOST_DOMAIN, server) const app = await getApp(HOST_DOMAIN, server)
if (!app) { if (!app) {
setResponseStatus(400) event.node.res.statusCode = 400
return `App not registered for server: ${server}` return `App not registered for server: ${server}`
} }