mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-11 17:41:04 +08:00
Revert "feat: add paginated notification API and frontend support"
This reverts commit df7ca77652.
This commit is contained in:
@@ -23,17 +23,9 @@ public class NotificationController {
|
||||
private final NotificationMapper notificationMapper;
|
||||
|
||||
@GetMapping
|
||||
public List<NotificationDto> list(@RequestParam(value = "page", defaultValue = "0") int page,
|
||||
public List<NotificationDto> list(@RequestParam(value = "read", required = false) Boolean read,
|
||||
Authentication auth) {
|
||||
return notificationService.listNotifications(auth.getName(), null, page).stream()
|
||||
.map(notificationMapper::toDto)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@GetMapping("/unread")
|
||||
public List<NotificationDto> listUnread(@RequestParam(value = "page", defaultValue = "0") int page,
|
||||
Authentication auth) {
|
||||
return notificationService.listNotifications(auth.getName(), false, page).stream()
|
||||
return notificationService.listNotifications(auth.getName(), read).stream()
|
||||
.map(notificationMapper::toDto)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user