Skip to content

Commit

Permalink
refacto: fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
quentingrchr committed Oct 3, 2024
1 parent 67c8b57 commit dd5c3a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/app/api/teams/[teamId]/bookmark/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ router
try {
const session = await getServerSession(options);
const { teamId } = event.params;
if (!session || !teamId) return HandlerApiError.unauthorized();
if (!session || !teamId) {
return HandlerApiError.unauthorized();
}
const membership = await getTeamMembershipById(teamId, session?.user?.id);

if (!linkUrl) {
Expand All @@ -71,5 +73,5 @@ router
});

export async function GET(request: NextRequest, ctx: RequestContext) {
return router.run(request, ctx);
return router.run(request, ctx) as Promise<Response>;
}
2 changes: 1 addition & 1 deletion src/app/api/teams/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ router.use(checkAuthAppRouter).post(async (req, event, next) => {
});

export async function POST(request: NextRequest, ctx: {}) {
return router.run(request, ctx);
return router.run(request, ctx) as Promise<Response>;
}

0 comments on commit dd5c3a2

Please sign in to comment.