Make it possible to return string via Webhook-Node

This commit is contained in:
Jan Oberhauser 2020-12-14 15:09:41 +01:00
parent 8528c2a2f1
commit 0918106328

View file

@ -64,7 +64,11 @@ export function sendSuccessResponse(res: Response, data: any, raw?: boolean, res
}
if (raw === true) {
res.json(data);
if (typeof data === 'string') {
res.send(data);
} else {
res.json(data);
}
} else {
res.json({
data,