Remove comment code and check for string type of data attribute
Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
parent
c42bc654df
commit
2ad2249724
|
@ -87,15 +87,6 @@ Spec03.prototype.check = function(ce){
|
|||
throw {message: "invalid payload", errors: isValidAgainstSchema.errors};
|
||||
}
|
||||
|
||||
Array.of(toCheck)
|
||||
.filter((tc) => (typeof tc.data) !== "string")
|
||||
.filter((tc) => tc["datacontentencoding"])
|
||||
.forEach((tc) => {
|
||||
throw {message: "invalid payload", errors: [
|
||||
"Use 'datacontentencoding' when 'data' is a string"
|
||||
]};
|
||||
});
|
||||
|
||||
Array.of(toCheck)
|
||||
.filter((tc) => tc["datacontentencoding"])
|
||||
.map((tc) => tc["datacontentencoding"].toLocaleLowerCase("en-US"))
|
||||
|
@ -108,6 +99,7 @@ Spec03.prototype.check = function(ce){
|
|||
|
||||
Array.of(toCheck)
|
||||
.filter((tc) => tc["datacontentencoding"])
|
||||
.filter((tc) => (typeof tc.data) === "string")
|
||||
.map((tc) => {
|
||||
let newtc = clone(tc);
|
||||
newtc.datacontentencoding =
|
||||
|
|
Loading…
Reference in New Issue