feat: 模型数据管理

This commit is contained in:
archer
2023-03-29 00:22:48 +08:00
parent 713332522f
commit f32c557bdd
14 changed files with 366 additions and 95 deletions

View File

@@ -14,6 +14,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
pageNum: string;
pageSize: string;
};
const { authorization } = req.headers;
pageNum = +pageNum;
@@ -41,7 +42,15 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
.limit(pageSize);
jsonRes(res, {
data
data: {
pageNum,
pageSize,
data,
total: await ModelData.countDocuments({
modelId,
userId
})
}
});
} catch (err) {
jsonRes(res, {