Updated the license.ts
This commit is contained in:
parent
83e4c7b70e
commit
cc83c78fc8
@ -9,6 +9,9 @@ app.get("/:projectId/list", async (req: Request, res: Response) => {
|
||||
const page = Number(req.query.page) || 0;
|
||||
const limit = Number(req.query.limit) || 100;
|
||||
|
||||
if (page < 0) return sendError(res, 400, 4, "The page number cannot be negative");
|
||||
if (limit < 1) return sendError(res, 400, 4, "The limit cannot be less than 1");
|
||||
|
||||
const licenses = await listLicensesPaginated(String(req.user?._id), req.params.projectId, page, limit);
|
||||
if ("code" in licenses) return res.json(licenses);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user