Fix code style: missing parens, double quote and semicolon

Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
Fabio José 2019-07-29 09:50:28 -03:00
parent 374c0a233c
commit d692f416b6
2 changed files with 4 additions and 4 deletions

View File

@ -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();
}

View File

@ -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};