diff --git a/apps/server/src/pages/api/v1/fires/index.ts b/apps/server/src/pages/api/v1/fires/index.ts index 5f7f33d2..0c34cb0f 100644 --- a/apps/server/src/pages/api/v1/fires/index.ts +++ b/apps/server/src/pages/api/v1/fires/index.ts @@ -27,8 +27,8 @@ export default async function firesBySiteHandler( // checkMethods(req, res, ["GET"]); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - if (!["OPTIONS", "GET"].includes(req.method!)) { - if (req.method === 'OPTIONS') { return res.status(200).send("Ok") } + if (req.method === 'OPTIONS') { return res.status(200).end() } + if (!["GET"].includes(req.method!)) { return res.status(405).json({ message: "Method Not Allowed" }); }