Exemplo n.º 1
0
        public async Task <ActionResult <ServiceRequestViewModel> > PendingServiceRequest(string clientId)
        {
            ServiceRequest serviceRequest = await _serviceRequestsRepository.GetPendingCustomerServiceRequest(clientId);

            if (serviceRequest is null)
            {
                return(NotFound($"No existe ninguna solicitud de servicio pendiente para el cliente identificaco con {clientId}."));
            }

            return(_mapper.Map <ServiceRequestViewModel>(serviceRequest));
        }