Exemplo n.º 1
0
 public async Task <IActionResult> GetAllRates([FromBody] ProductId id)
 {
     try
     {
         var data = _ratesService.GetAllRates(id.Id);
         return(Ok(new Result()
         {
             Code = (int)HttpStatusCode.OK, Data = data, Error = null
         }));
     }
     catch (Exception ex)
     {
         _logger.LogError("Lấy dữ liệu đánh giá thất bại: " + ex);
         return(Ok(new Result()
         {
             Code = (int)HttpStatusCode.OK, Data = null, Error = "Lấy dữ liệu đánh giá thất bại"
         }));
     }
 }