Fix code style: missing parens, double quote and semicolon
Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
parent
374c0a233c
commit
d692f416b6
|
@ -4,8 +4,8 @@ const Constants = require("./constants.js");
|
|||
function sanityContentType(contentType) {
|
||||
if(contentType) {
|
||||
return Array.of(contentType)
|
||||
.map(c => c.split(";"))
|
||||
.map(c => c.shift())
|
||||
.map((c) => c.split(";"))
|
||||
.map((c) => c.shift())
|
||||
.shift();
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ Spec03.prototype.check = function(ce){
|
|||
var valid = isValidAgainstSchema(toCheck);
|
||||
|
||||
Array.of(toCheck)
|
||||
.filter((tc) => (typeof tc.data) !== 'string')
|
||||
.filter((tc) => (typeof tc.data) !== "string")
|
||||
.filter((tc) => tc["datacontentencoding"])
|
||||
.forEach((tc) => {
|
||||
throw {message: "invalid payload", errors: [
|
||||
|
@ -94,7 +94,7 @@ Spec03.prototype.check = function(ce){
|
|||
throw {message: "invalid payload", errors: [
|
||||
"Unsupported content encoding: " + dce
|
||||
]};
|
||||
})
|
||||
});
|
||||
|
||||
if(!valid) {
|
||||
throw {message: "invalid payload", errors: isValidAgainstSchema.errors};
|
||||
|
|
Loading…
Reference in New Issue