⚡ Make it possible to return string via Webhook-Node
This commit is contained in:
@@ -64,7 +64,11 @@ export function sendSuccessResponse(res: Response, data: any, raw?: boolean, res
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (raw === true) {
|
if (raw === true) {
|
||||||
res.json(data);
|
if (typeof data === 'string') {
|
||||||
|
res.send(data);
|
||||||
|
} else {
|
||||||
|
res.json(data);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
res.json({
|
res.json({
|
||||||
data,
|
data,
|
||||||
|
|||||||
Reference in New Issue
Block a user