Ignore:
Timestamp:
03/24/26 22:13:36 (3 months ago)
Author:
kikisrbinoska <srbinoskakristina07@…>
Branches:
main
Children:
7fbb91c
Parents:
acf690c
Message:

Fixed reading lists,comments and likes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ChapterX.Infrastructure/Repositories/NotificationRepository.cs

    racf690c r73b69b2  
    1515        // This method returns all notifications; adjust filter when a User relation is added.
    1616        public async Task<IEnumerable<Notification>> GetByUserIdAsync(int userId, CancellationToken cancellationToken = default)
    17         {
    18             return await _dbSet.ToListAsync(cancellationToken);
    19         }
     17            => await _dbSet
     18                .Where(n => n.RecipientUserId == userId)
     19                .OrderByDescending(n => n.CreatedAt)
     20                .ToListAsync(cancellationToken);
    2021    }
    2122}
Note: See TracChangeset for help on using the changeset viewer.