diff --git a/src/pages/api/teams/[teamId]/users/index.ts b/src/pages/api/teams/[teamId]/users/index.ts index 3c4dfd71..3a03feaf 100644 --- a/src/pages/api/teams/[teamId]/users/index.ts +++ b/src/pages/api/teams/[teamId]/users/index.ts @@ -44,8 +44,6 @@ export default async ( return unauthorized(res); } - const { query, page, pageSize } = req.query; - const users = await getTeamUsers( { where: { @@ -63,11 +61,7 @@ export default async ( }, }, }, - { - query, - page, - pageSize, - }, + req.query, ); return ok(res, users); diff --git a/src/pages/api/users/[userId]/teams.ts b/src/pages/api/users/[userId]/teams.ts index dda65355..279df1e3 100644 --- a/src/pages/api/users/[userId]/teams.ts +++ b/src/pages/api/users/[userId]/teams.ts @@ -39,13 +39,7 @@ export default async ( return unauthorized(res); } - const { page, query, pageSize } = req.query; - - const teams = await getUserTeams(userId as string, { - query, - page, - pageSize, - }); + const teams = await getUserTeams(userId as string, req.query); return ok(res, teams); }