From 94a27226d1e37b15741bfa6fe3fa272f8f1cbe26 Mon Sep 17 00:00:00 2001 From: Brian Cao Date: Fri, 13 Oct 2023 11:33:20 -0700 Subject: [PATCH 1/2] Add missing parameters. --- src/pages/api/users/[id]/websites.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/pages/api/users/[id]/websites.ts b/src/pages/api/users/[id]/websites.ts index 26170472..4eb659c8 100644 --- a/src/pages/api/users/[id]/websites.ts +++ b/src/pages/api/users/[id]/websites.ts @@ -30,7 +30,15 @@ export default async ( await useValidate(schema, req, res); const { user } = req.auth; - const { id: userId, page = 1, query = '', includeTeams, onlyTeams } = req.query; + const { + id: userId, + page = 1, + pageSize, + orderBy, + query = '', + includeTeams, + onlyTeams, + } = req.query; if (req.method === 'GET') { if (!user.isAdmin && user.id !== userId) { @@ -39,7 +47,9 @@ export default async ( const websites = await getWebsitesByUserId(userId, { page, + pageSize, query, + orderBy, includeTeams, onlyTeams, }); From 49069860804edafe09293c0bac71256ca9f3133d Mon Sep 17 00:00:00 2001 From: Brian Cao Date: Fri, 13 Oct 2023 12:47:47 -0700 Subject: [PATCH 2/2] Fix data map. --- src/app/(main)/settings/users/UserWebsites.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(main)/settings/users/UserWebsites.js b/src/app/(main)/settings/users/UserWebsites.js index 333ba5d1..18b5f1a7 100644 --- a/src/app/(main)/settings/users/UserWebsites.js +++ b/src/app/(main)/settings/users/UserWebsites.js @@ -22,7 +22,7 @@ export function UserWebsites({ userId }) { {hasData && (