Example #1
0
 public IActionResult GetByUsuario(Guid Id)
 {
     try
     {
         List <Curtida> curtidas = _curtidaRepository.ListarPorUsuario(Id);
         if (curtidas.Count == 0)
         {
             return(NoContent());
         }
         return(Ok(new
         {
             totalCount = curtidas.Count(),
             data = curtidas
         }));
     }
     catch (Exception ex)
     {
         return(BadRequest(new
         {
             statusCode = 400,
             error = ex.Message
         }));
     }
 }