mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
Fixed a bug with the notification preferences !wip
This commit is contained in:
parent
91b6dfe2b7
commit
550028b9eb
1 changed files with 13 additions and 9 deletions
|
@ -579,11 +579,11 @@ namespace Ombi.Controllers
|
|||
{
|
||||
Errors = messages
|
||||
};
|
||||
}
|
||||
}
|
||||
// Add the quality profiles
|
||||
if (ui.UserQualityProfiles != null)
|
||||
{
|
||||
var currentQualityProfiles = await
|
||||
var currentQualityProfiles = await
|
||||
_userQualityProfiles.GetAll().FirstOrDefaultAsync(x => x.UserId == user.Id);
|
||||
var add = false;
|
||||
if (currentQualityProfiles == null)
|
||||
|
@ -955,19 +955,23 @@ namespace Ombi.Controllers
|
|||
// Update it
|
||||
existingPreference.Value = pref.Value;
|
||||
existingPreference.Enabled = pref.Enabled;
|
||||
await _userNotificationPreferences.SaveChangesAsync();
|
||||
}
|
||||
await _userNotificationPreferences.Add(new UserNotificationPreferences
|
||||
else
|
||||
{
|
||||
Agent = pref.Agent,
|
||||
Enabled = pref.Enabled,
|
||||
UserId = pref.UserId,
|
||||
Value = pref.Value
|
||||
});
|
||||
await _userNotificationPreferences.Add(new UserNotificationPreferences
|
||||
{
|
||||
Agent = pref.Agent,
|
||||
Enabled = pref.Enabled,
|
||||
UserId = pref.UserId,
|
||||
Value = pref.Value
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
return Json(true);
|
||||
}
|
||||
|
||||
|
||||
private async Task<List<IdentityResult>> AddRoles(IEnumerable<ClaimCheckboxes> roles, OmbiUser ombiUser)
|
||||
{
|
||||
var roleResult = new List<IdentityResult>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue