Esempio n. 1
0
        public async Task <ActionResult <RequestReadDto> > GetRequestById(int id)
        {
            try
            {
                var request = await requestsRepository.GetRequestAsync(id);

                return(Ok(request));
            }
            catch (Exception ex)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, new Response {
                    Status = "Error", Message = ex.Message
                }));
            }
        }