pis #12

Merged
fred.boniface merged 95 commits from pis into main 2023-05-06 21:54:51 +01:00
Showing only changes of commit 5af6122646 - Show all commits

View File

@ -0,0 +1,9 @@
const log = require('../utils/log.utils')
module.exports = async function requireJson(req, res, next) {
if (req.headers['content-type'] !== 'application/json') {
res.status(400).send({status: 400, message: "Server requires JSON"})
} else {
next()
}
}