Fix crash int he neww .json() method
This commit is contained in:
parent
71c78a45d7
commit
eb7b8fcfb9
|
@ -44,7 +44,7 @@ class Sender {
|
||||||
* @return {void}
|
* @return {void}
|
||||||
*/
|
*/
|
||||||
json(status_code, obj) {
|
json(status_code, obj) {
|
||||||
this.string(status_code, "application/json", obj);
|
this.string(status_code, "application/json", JSON.parse(obj));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Sends a given string with a given content-type.
|
* Sends a given string with a given content-type.
|
||||||
|
|
Loading…
Reference in New Issue