Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
hubcio2115 committed Sep 29, 2024
1 parent 4e0c5e5 commit 6a8c6e5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions apps/web/src/app/api/organizations/[name]/projects/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function GET(

if (err !== null) {
if (err === "Not found") {
return redirect("404");
return redirect("/404");
}

return NextResponse.json(
Expand All @@ -38,7 +38,11 @@ export async function GET(
);
}

const projectsResponse = await getOrganizationProjects(organization.id, +page, query);
const projectsResponse = await getOrganizationProjects(
organization.id,
+page,
query,
);

return NextResponse.json(projectsResponse);
}
4 changes: 2 additions & 2 deletions apps/web/src/server/actions/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ export async function getOrganizationProjects(

return {
projects,
total: projectCount[0]!.count,
hasNextPage: projectCount[0]!.count > page * 12,
total: projectCount[0]?.count!,
hasNextPage: projectCount[0]?.count! > page * 12,
};
}

Expand Down

0 comments on commit 6a8c6e5

Please sign in to comment.