1
0
Fork 0
mirror of https://github.com/sbrl/powahroot.git synced 2024-12-26 04:45:01 +00:00

Fix crash int he neww .json() method

This commit is contained in:
Starbeamrainbowlabs 2022-02-24 01:24:13 +00:00
parent 71c78a45d7
commit eb7b8fcfb9
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -44,7 +44,7 @@ class Sender {
* @return {void}
*/
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.