From 326b9fd571983fa41c5d13cc999fcaaf74e2f36c Mon Sep 17 00:00:00 2001 From: Xuty Date: Sun, 29 Sep 2024 17:35:16 +0200 Subject: [PATCH] feat(configuration): fixed cookies configuration --- fixup.sh | 10 +++++----- package.json | 2 +- .../services/configuration.service.ts | 16 +++++++++++++++- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/fixup.sh b/fixup.sh index d627e71..43b4cc0 100755 --- a/fixup.sh +++ b/fixup.sh @@ -4,8 +4,8 @@ cat >server/cjs/package.json <server/mjs/package.json <server/mjs/package.json < { - return structuredClone(this.KEYS.cookies || []); + const keys = (this.KEYS.cookies || []) as string[]; + + if (!keys.length) { + [ + "This is a test key", + "This is another test key", + "This is yet another test key" + ].forEach((key) => { + keys.push(key); + }); + + console.warn('No keys found, using default ones!'); + } + + return structuredClone(keys); }, oauth: () => { return structuredClone(this.KEYS.oauth || { });