From 15250a1c00abe49d161a8f89d9f639a9556e0630 Mon Sep 17 00:00:00 2001 From: teddit Date: Sat, 20 Mar 2021 17:30:58 +0100 Subject: [PATCH] return when sending json --- routes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes.js b/routes.js index 33bfe53..c7010dc 100644 --- a/routes.js +++ b/routes.js @@ -1650,7 +1650,7 @@ module.exports = (app, redis, fetch, RedditAPI) => { if(export_to_file === 'on') { res.setHeader('Content-disposition', 'attachment; filename=teddit_prefs.json') res.setHeader('Content-type', 'application/json') - res.send(req.cookies) + return res.send(req.cookies) } let r = `${(Math.random().toString(36)+'00000000000000000').slice(2, 10+2).toUpperCase()}`