优化更新
This commit is contained in:
@@ -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
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user