kodex-music-catalog/api/v1/methods/create-item.js
2023-09-30 16:52:13 +03:00

19 lines
454 B
JavaScript

const ApiError = require('../errorClass');
function checkSyntaxArgs (req, res) {
return (
( // Проверка поля type в json.
)
)
}
module.exports = (req, res) => {
if (req.json === undefined) {
// console.log(req.headers);
throw new ApiError("METHOD_MUST_BE_POST_JSON", {
request_method : req.method,
'content-type' : !req.headers['content-type'] ? null : req.headers['content-type']
});
}
return 'method create item';
}