Fix graphql response type

This commit is contained in:
rijkvanzanten
2021-01-14 12:52:57 -05:00
parent 2968a04739
commit d98300d528
3 changed files with 14 additions and 10 deletions

View File

@@ -63,7 +63,11 @@ export const respond: RequestHandler = asyncHandler(async (req, res) => {
}
}
return res.json(res.locals.payload);
if (Buffer.isBuffer(res.locals.payload)) {
return res.end(res.locals.payload);
} else {
return res.json(res.locals.payload);
}
});
function getDateFormatted() {