Changing error message on route not found

This commit is contained in:
Collin Duncan 2022-11-21 18:53:42 +01:00
parent 5cdbc3ebb0
commit 4f3c0e9938
No known key found for this signature in database

View file

@ -65,8 +65,8 @@ const server = http.createServer(async (req, res) => {
!/^\/reservations$/.test(url) || !/^\/reservations$/.test(url) ||
method.toLowerCase() !== 'post' method.toLowerCase() !== 'post'
) { ) {
Logger.info('Bad request') Logger.info('Not found')
res.writeHead(400, 'Bad request') res.writeHead(404, 'Not found')
res.end() res.end()
return return
} }