fix(tool-config): merge partial updates instead of replacing, mask bot_app_password

This commit is contained in:
Matthias Hochmeister
2026-04-17 09:30:13 +02:00
parent 7532a19326
commit 510b44e48c
2 changed files with 15 additions and 2 deletions

View File

@@ -14,6 +14,8 @@ export interface VikunjaConfig {
export interface NextcloudConfig {
url: string;
bot_username?: string;
bot_app_password?: string;
}
interface CacheEntry<T> {
@@ -72,6 +74,8 @@ async function getNextcloudConfig(): Promise<NextcloudConfig> {
const db = await getDbConfig('tool_config_nextcloud');
const config: NextcloudConfig = {
url: db.url || environment.nextcloudUrl,
bot_username: db.bot_username || undefined,
bot_app_password: db.bot_app_password || undefined,
};
nextcloudCache = { data: config, expiresAt: Date.now() + CACHE_TTL_MS };