优化更新

This commit is contained in:
2026-02-18 22:28:08 +08:00
parent b6c133952b
commit 0ecb088569
8 changed files with 107 additions and 38 deletions

View File

@@ -55,16 +55,16 @@ class Notification extends Controller
public function unread(Request $request): JsonResponse
{
$userId = auth('admin')->id();
$limit = $request->input('limit', 10);
$limit = $request->input('limit', $request->input('page_size', 10));
$page = $request->input('page', 1);
$type = $request->input('type');
$notifications = $this->notificationService->getUnreadNotifications($userId, $limit);
$result = $this->notificationService->getUnreadNotifications($userId, $limit, $page, $type);
return response()->json([
'code' => 200,
'message' => 'success',
'data' => [
'list' => $notifications
]
'data' => $result
]);
}