From bdaf58b7b01fc86d66fbb03c2d4c309e8628d972 Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Sat, 2 Apr 2022 20:21:46 +0000 Subject: [PATCH] util: Fix bug where application config was still being leaked --- api/util.mjs | 6 ++++-- package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api/util.mjs b/api/util.mjs index 673ca91..41c3822 100644 --- a/api/util.mjs +++ b/api/util.mjs @@ -19,7 +19,9 @@ export function safeWrap(log, name, fn) { export function getConfig(ctx) { let merge = { - applications: [] + applications: [], + name: ctx.db.config.name || '', + title: ctx.db.config.title || '', } for (let app of ctx.core.applications) { merge[app.name] = { @@ -30,7 +32,7 @@ export function getConfig(ctx) { } merge.applications.push(app.name) } - return defaults(ctx.db.config, merge) + return merge } export function getApp(ctx, name, action) { diff --git a/package.json b/package.json index b1e682e..905d81e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sc-manager", - "version": "2.0.3", + "version": "2.0.4", "description": "", "main": "index.js", "scripts": {