fix: Fix typeorm .save usage (no-changelog) (#8678)
This commit is contained in:
@@ -12,7 +12,11 @@ export class SettingsRepository extends Repository<Settings> {
|
||||
}
|
||||
|
||||
async getEncryptedSecretsProviderSettings(): Promise<string | null> {
|
||||
return (await this.findOne({ where: { key: EXTERNAL_SECRETS_DB_KEY } }))?.value ?? null;
|
||||
return (await this.findByKey(EXTERNAL_SECRETS_DB_KEY))?.value ?? null;
|
||||
}
|
||||
|
||||
async findByKey(key: string): Promise<Settings | null> {
|
||||
return await this.findOneBy({ key });
|
||||
}
|
||||
|
||||
async saveEncryptedSecretsProviderSettings(data: string): Promise<void> {
|
||||
@@ -38,7 +42,7 @@ export class SettingsRepository extends Repository<Settings> {
|
||||
await this.update({ key }, { value, loadOnStartup: true });
|
||||
} else {
|
||||
value = JSON.stringify([bannerName]);
|
||||
await this.save({ key, value, loadOnStartup: true });
|
||||
await this.save({ key, value, loadOnStartup: true }, { transaction: false });
|
||||
}
|
||||
config.set(key, value);
|
||||
return { success: true };
|
||||
|
||||
Reference in New Issue
Block a user