Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linstt-controller
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LINAGORA
L
LGS
Labs
linstt-controller
Commits
1ffb9480
Commit
1ffb9480
authored
Feb 28, 2018
by
Yoann HOUPERT
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix/content-type' into production
parents
b582542c
76a6c18a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
lib/webserver/routes.js
lib/webserver/routes.js
+5
-0
No files found.
lib/webserver/routes.js
View file @
1ffb9480
...
...
@@ -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
()});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment