mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fix handling of string/empty responses
This commit is contained in:
parent
24a45b03f5
commit
824f5dbaac
@ -107,7 +107,7 @@ function apiResultHandler(req, res, result) {
|
|||||||
|
|
||||||
function send(res, statusCode, response) {
|
function send(res, statusCode, response) {
|
||||||
if (typeof response === 'string') {
|
if (typeof response === 'string') {
|
||||||
res.status(statusCode, response);
|
res.status(statusCode).send(response);
|
||||||
|
|
||||||
return response.length;
|
return response.length;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user