Ignore:
Timestamp:
08/24/22 17:11:52 (2 years ago)
Author:
Danilo <danilo.najkov@…>
Branches:
master
Children:
d86edb7
Parents:
a569b7c
Message:

reviews pagination

File:
1 edited

Legend:

Unmodified
Added
Removed
  • resTools_backend/backend/Services/RestaurantService.cs

    ra569b7c r63f5ced  
    4747                        Price = x.Price
    4848                    }).ToList(),
    49                     Reviews = x.Reviews.OrderByDescending(x => x.CreatedAt).Select(x => new ReviewResponse()
     49                    Reviews = x.Reviews.Select(x => new ReviewResponse()
    5050                    {
     51                        CreatedAt = x.CreatedAt,
     52                        Description = x.Description,
    5153                        Id = x.Id,
     54                        Stars = x.Stars,
    5255                        Title = x.Title,
    53                         Description = x.Description,
    54                         Stars = x.Stars,
    55                         CreatedAt = x.CreatedAt,
    5656                        Username = x.User == null ? "Anonymous" : x.User.Email
    5757                    }).ToList(),
Note: See TracChangeset for help on using the changeset viewer.