public async Task <IActionResult> UpdateUserNotificationSettingsAsync(NotificationSettingKey key, [FromBody] NotificationSettingValue value) { var userId = GetCurrentSaasUserId(); var res = await _notificationSettingsService.UpdateUserNotificationSettingsAsync(new NotificationSettingRequest(userId) { Key = key, Value = value }); return(Ok(res)); }
private NotificationSettings FillNotificationSettings(NotificationSettingKey notificationSettingKey, NotificationSettingValue notificationSettingValue, NotificationSettings notificationSettings) { switch (notificationSettingKey) { case NotificationSettingKey.GroupNotifications: { notificationSettings.IsChannelNotificationsDisabled = notificationSettingValue; break; } default: { throw new ArgumentOutOfRangeException(); } } return(notificationSettings); }