Make body function work with all tests
This commit is contained in:
parent
29d579b8ac
commit
ee767d8067
@ -8,6 +8,7 @@ function match(message, headers) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function body(message) {
|
function body(message) {
|
||||||
|
if (message["body"] !== undefined) {
|
||||||
if (message["body"][0]["content-type"] === "text/plain") {
|
if (message["body"][0]["content-type"] === "text/plain") {
|
||||||
return message["body"][0]["content"];
|
return message["body"][0]["content"];
|
||||||
}
|
}
|
||||||
@ -16,6 +17,8 @@ function body(message) {
|
|||||||
return message["body"][0]["content"][0]["content"];
|
return message["body"][0]["content"][0]["content"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
function string(message) {
|
function string(message) {
|
||||||
let string = "";
|
let string = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user