Added sorting by creation date
This commit is contained in:
parent
122a205f92
commit
559a00c181
4 changed files with 4 additions and 0 deletions
|
@ -177,6 +177,7 @@
|
|||
.ThenInclude(x => x.Author)
|
||||
.First(x => x.Id == Post.Id)
|
||||
.Comments
|
||||
.OrderBy(x => x.CreatedAt)
|
||||
.ToArray();
|
||||
|
||||
return Task.CompletedTask;
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
.Get()
|
||||
.Include(x => x.Author)
|
||||
.Where(x => x.Type == PostType.Event)
|
||||
.OrderByDescending(x => x.CreatedAt)
|
||||
.ToArray();
|
||||
|
||||
return Task.CompletedTask;
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
.Get()
|
||||
.Include(x => x.Author)
|
||||
.Where(x => x.Type == PostType.Announcement)
|
||||
.OrderByDescending(x => x.CreatedAt)
|
||||
.ToArray();
|
||||
|
||||
return Task.CompletedTask;
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
.Get()
|
||||
.Include(x => x.Author)
|
||||
.Where(x => x.Type == PostType.Project)
|
||||
.OrderByDescending(x => x.CreatedAt)
|
||||
.ToArray();
|
||||
|
||||
return Task.CompletedTask;
|
||||
|
|
Loading…
Reference in a new issue