Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/umami-software/umami into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscao633 committed Oct 13, 2023
2 parents 8cc7657 + 4906986 commit 170a269
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/(main)/settings/users/UserWebsites.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function UserWebsites({ userId }) {
<Page loading={isLoading} error={error}>
{hasData && (
<WebsitesTable
data={data}
data={data.data}
onFilterChange={handleFilterChange}
onPageChange={handlePageChange}
onPageSizeChange={handlePageSizeChange}
Expand Down
12 changes: 11 additions & 1 deletion src/pages/api/users/[id]/websites.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -39,7 +47,9 @@ export default async (

const websites = await getWebsitesByUserId(userId, {
page,
pageSize,
query,
orderBy,
includeTeams,
onlyTeams,
});
Expand Down

0 comments on commit 170a269

Please sign in to comment.