Updated the pagination on the useUsers and migrading the grading
This commit is contained in:
@@ -13,14 +13,14 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
return;
|
||||
}
|
||||
|
||||
const {size, type, latestID, firstID} = req.query as {size?: string; type?: Type; latestID?: string; firstID?: string};
|
||||
const {size, type, page} = req.query as {size?: string; type?: Type; page?: string};
|
||||
console.log(size, type, page);
|
||||
|
||||
const {users, total} = await getLinkedUsers(
|
||||
req.session.user?.id,
|
||||
req.session.user?.type,
|
||||
type,
|
||||
firstID,
|
||||
latestID,
|
||||
page !== undefined ? parseInt(page) : undefined,
|
||||
size !== undefined ? parseInt(size) : undefined,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user