diff --git a/lib/handlers/api.ts b/lib/handlers/api.ts index bbfdf82d2..6dfbaee8b 100644 --- a/lib/handlers/api.ts +++ b/lib/handlers/api.ts @@ -43,8 +43,7 @@ import {StorageBase} from '../storage/index.js'; import {CompileHandler} from './compile.js'; function methodNotAllowed(req: express.Request, res: express.Response) { - res.send('Method Not Allowed'); - res.status(405).end(); + res.status(405).send('Method Not Allowed').end(); } export class ApiHandler {