public async Task <IActionResult> UpdateAppSettings([FromBody] EmbedAppSettingsForPutDto newSettings) { await RequireSiteAdmin(); AppSettingsRepository repo = AppSettingsRepository.CreateDefault(_serviceProvider); AppSettings current = await repo.GetAppSettings(); current.EmbedTitle = newSettings.EmbedTitle; current.EmbedContent = newSettings.EmbedContent; return(Ok(await repo.UpdateAppSettings(current))); }
public async Task <IActionResult> UpdateAppSettings([FromBody] SettingsAppSettingsForPutDto newSettings) { await RequireSiteAdmin(); AppSettingsRepository repo = AppSettingsRepository.CreateDefault(_serviceProvider); AppSettings current = await repo.GetAppSettings(); current.DefaultLanguage = newSettings.DefaultLanguage; current.AuditLogWebhookURL = newSettings.AuditLogWebhookURL ?? string.Empty; current.PublicFileMode = newSettings.PublicFileMode; return(Ok(await repo.UpdateAppSettings(current))); }