Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Refresh.Database/GameDatabaseContext.Notifications.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ public int GetNotificationCountByUser(GameUser user) =>
.Count(n => n.User == user);

[Pure]
public DatabaseList<GameNotification> GetNotificationsByUser(GameUser user, int count, int skip) =>
new(this.GameNotifications.Where(n => n.User == user), skip, count);
public DatabaseList<GameNotification> GetNotificationsByUser(GameUser user, int count, int skip)
=> new(this.GameNotifications
.Where(n => n.UserId == user.UserId)
.OrderByDescending(n => n.CreatedAt), skip, count);

[Pure]
public GameNotification? GetNotificationByUuid(GameUser user, ObjectId id)
Expand Down
Loading