add header on raw return

This commit is contained in:
b1ek 2023-03-04 11:40:29 +10:00
parent 0b5010977f
commit eaf1c72752
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 1 additions and 0 deletions

View File

@ -6,6 +6,7 @@ const content = require('../helpers/content');
async function view(req, res) { async function view(req, res) {
const data = await content.get(req.query.id); const data = await content.get(req.query.id);
if (req.query.raw) { if (req.query.raw) {
res.header('Content-Type', 'text/plain');
res.send(data); res.send(data);
return; return;
} }