fix(tool-config): merge partial updates instead of replacing, mask bot_app_password
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user