|
|
@@ -151,16 +151,12 @@ Server.prototype.onRequest = function(req, res) {
|
|
|
res.writeHeader("403", {
|
|
|
"Content-Type": "application/json"
|
|
|
});
|
|
|
- res.write(slack.error, () => {
|
|
|
- res.end();
|
|
|
- });
|
|
|
+ res.end(slack.error);
|
|
|
} else {
|
|
|
res.writeHeader("200", {
|
|
|
"Content-Type": "application/json"
|
|
|
});
|
|
|
- res.write(JSON.stringify(newData), () => {
|
|
|
- res.end();
|
|
|
- });
|
|
|
+ res.end(JSON.stringify(newData));
|
|
|
}
|
|
|
} catch (e) {}
|
|
|
}
|