Revert "feat: add paginated notifications and unread endpoint"

This reverts commit 73168c1859.
This commit is contained in:
tim
2025-08-19 18:24:49 +08:00
parent df92ff664c
commit 10b6fdd1cb
7 changed files with 26 additions and 96 deletions

View File

@@ -65,12 +65,12 @@ class NotificationServiceTest {
when(uRepo.findByUsername("bob")).thenReturn(Optional.of(user));
Notification n = new Notification();
when(nRepo.findByUser(eq(user), any())).thenReturn(new org.springframework.data.domain.PageImpl<>(List.of(n)));
when(nRepo.findByUserOrderByCreatedAtDesc(user)).thenReturn(List.of(n));
List<Notification> list = service.listNotifications("bob", null, 0, 50);
List<Notification> list = service.listNotifications("bob", null);
assertEquals(1, list.size());
verify(nRepo).findByUser(eq(user), any());
verify(nRepo).findByUserOrderByCreatedAtDesc(user);
}
@Test