Exemple #1
0
        public async Task <ApiResponse> Put(int id, [FromBody] PutPriorityDTO arg)
        {
            try
            {
                await priorityService.UpdateAsync(id, arg);

                return(new ApiResponse(InfoMessages.PriorityUpdated, null, HttpStatusCode.OK.ToInt()));
            }
            catch (ValidationException ex)
            {
                throw new ApiException(ex.Errors, ex.StatusCode);
            }
            catch (CustomException ex)
            {
                throw new ApiException(ex, ex.StatusCode);
            }
            catch (Exception ex)
            {
                throw new ApiException(ex);
            }
        }