Commit 0d4dcc47 authored by Yoann HOUPERT's avatar Yoann HOUPERT

Merge branch 'next' into 'master'

Next

See merge request !7
parents db010ea3 2a9632ad
Pipeline #11560 passed with stage
in 45 seconds
......@@ -23,6 +23,7 @@ const uuidv1 = require('uuid/v1');
const successCode = 200;
const badRequestCode = 400;
const noContentTypeCode = 406;
const interalServerCode = 500;
const routesFactory = config => {
......@@ -37,6 +38,10 @@ const routesFactory = config => {
return res.status(badRequestCode).send('No files were uploaded.');
}
if (req.get('content-type') === undefined) {
return res.status(noContentTypeCode).send('No content type given');
}
enhancer.enhancement(req.body, (err, response, body) => {
if (err) {
return res.status(interalServerCode).json({module: 'Enhancement', error: 'Error during audio enhancing', info: err.toString()});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment