|
@@ -130,7 +130,7 @@ export async function GET(request) {
|
|
|
const skip = (current - 1) * pageSize;
|
|
|
const totalMatches = await Match.countDocuments(searchQuery);
|
|
|
const matchesData = await Match.find(searchQuery)
|
|
|
- .sort({ date: -1, time: -1 })
|
|
|
+ .sort({ date: -1, time: 1 })
|
|
|
.skip(skip)
|
|
|
.limit(pageSize);
|
|
|
|
|
@@ -176,7 +176,7 @@ export async function GET(request) {
|
|
|
date: { $gte: startDate, $lte: endDate },
|
|
|
status: { $in: ["未开始", "进行中"] },
|
|
|
...dateTypeFilter,
|
|
|
- }).sort({ time: 1 });
|
|
|
+ }).sort({ date: 1, time: 1 });
|
|
|
|
|
|
response = NextResponse.json({ success: true, data: matches });
|
|
|
break;
|