perf: 完善拆分数据模式

This commit is contained in:
archer
2023-03-25 23:37:50 +08:00
parent 60f62507bd
commit da31ef286b
4 changed files with 14 additions and 3 deletions

View File

@@ -23,8 +23,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
await authToken(authorization);
const dataItems = await DataItem.find({
dataId,
status: 0
dataId
})
.sort({ _id: -1 }) // 按照创建时间倒序排列
.skip((pageNum - 1) * pageSize)