コード例 #1
0
        public async Task <IActionResult> UpdateExternalService(int serviceId, UpdateExternalServiceDto dto)
        {
            // exclude configs since it may contain secret values
            var requestBodyToLog = new UpdateExternalServiceDto
            {
                Description = dto.Description
            };

            _logger.LogInformation("Updating external service {serviceId}. Request body: {@requestBodyToLog}", serviceId, requestBodyToLog);

            var updatedService = _mapper.Map <ExternalService>(dto);

            updatedService.Id = serviceId;
            await _externalServiceService.UpdateExternalService(updatedService);

            return(Ok());
        }
コード例 #2
0
        public async Task UpdateExternalService(int serviceId, UpdateExternalServiceDto dto)
        {
            var path = $"service/{serviceId}";

            await Api.Put <UpdateExternalServiceDto>(path, dto);
        }