feat(route): add record number parameter (#11945)

* feat(route): add record number parameter

* fix(route): use limit instead
This commit is contained in:
qizidog 2023-02-24 04:45:51 +08:00 committed by GitHub
parent 70670bd18b
commit 1cb28ff862
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -4,9 +4,10 @@ const got = require('@/utils/got');
const rootURL = 'https://jiuye.swjtu.edu.cn/career';
module.exports = async (ctx) => {
const limit = Math.min(ctx.query.limit ?? 10, 50);
const resp = await got({
method: 'post',
url: `${rootURL}/zpxx/search/zpxx/1/30`,
url: `${rootURL}/zpxx/search/zpxx/1/${limit}`,
});
const list = resp.data.data.list;