Esempio n. 1
0
        public async Task <IActionResult> Index(SystemSetting model)
        {
            var setting = await _systemSettingService.GetSettingAsync(model.Key);

            if (setting == null)
            {
                return(NotFound());
            }

            setting.Value         = model.Value;
            setting.LastUpdated   = DateTime.UtcNow;
            setting.LastUpdatedBy = User.UserId();
            await _systemSettingService.UpdateAsync(setting, User.UserId());

            return(Json(model));
        }