Ejemplo n.º 1
0
        public async Task <bool> Update(string application, int userId, string key, string value)
        {
            var name  = $"{Prefix}Update";
            var model = new UserPreferencesRequest
            {
                Application = application,
                UserId      = userId,
                Key         = key,
                Value       = value
            };
            var response = await PatchAsync(name, Url, model);

            return(await GetResult(response, false));
        }
Ejemplo n.º 2
0
 public IActionResult UpdatePreferences(UserPreferencesRequest r) =>
 Repo
 .UpdatePreferences(r.ToModel(DataContext.ActiveUserId))
 .RefreshEffectivePreferences(ActualUser, DataContext)
 .RefreshToken()
 .ToActionResult(x => new { Message = "Preferences updated", x.Value.Bag.Token });