public async Task UpdateSettingAsync(UpdateAgentSettingDto dto)
        {
            var agent = await Get(dto.AgentId);

            await Task.WhenAll(_unitOfWork.CompleteAsync(ctx =>
                                                         agent.UpdateSetting(new AgentSetting(dto.Version))),
                               _cacheStore.RemoveAsync(GetCacheKey(dto.AgentId)));
        }
Example #2
0
        public async Task <Result> UpdateSetting([FromBody] UpdateAgentSettingDto dto)
        {
            await _agentService.UpdateSettingAsync(dto);

            return(Result.Success());
        }