fix idp on started

This commit is contained in:
lendry
2026-06-24 17:34:55 +03:00
parent e60d55f6bd
commit b6987f4aea
10 changed files with 556 additions and 225 deletions

View File

@@ -41,6 +41,20 @@ export class SettingsService {
}
async upsert(command: UpsertSettingCommand) {
const trimmedValue = command.value?.trim() ?? '';
if (command.isSecret && trimmedValue === '') {
const existing = await this.prisma.systemSetting.findUnique({ where: { key: command.key } });
if (existing) {
return this.prisma.systemSetting.update({
where: { key: command.key },
data: {
description: command.description,
isSecret: command.isSecret ?? existing.isSecret
}
});
}
}
return this.prisma.systemSetting.upsert({
where: { key: command.key },
create: {