From df51432a8f62ac050f25c1ce333dfaa5491a2bdd Mon Sep 17 00:00:00 2001 From: knotteye Date: Thu, 30 Jul 2020 01:14:33 -0500 Subject: [PATCH] Fix /api/:user/config not returning all info for an authorized user. --- src/api.ts | 2 +- src/http.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api.ts b/src/api.ts index 259dffd..3883abe 100644 --- a/src/api.ts +++ b/src/api.ts @@ -1,4 +1,4 @@ -import * as db from "./database" +import * as db from "./database"; import { config } from "./config"; import {unlink} from "fs"; diff --git a/src/http.ts b/src/http.ts index 9cbdafb..14755a2 100644 --- a/src/http.ts +++ b/src/http.ts @@ -338,12 +338,12 @@ async function initAPI() { }); return; } - api.getConfig(req.params.user).then(re => { + else api.getConfig(req.params.user).then(re => { res.send(JSON.stringify(re)); }); return; }); - api.getConfig(req.params.user).then(r => { + else api.getConfig(req.params.user).then(r => { res.send(JSON.stringify(r)); }); });