refactor: migrate authentication to NextAuth and clean up related services

This commit is contained in:
Julien Froidefond
2025-10-12 15:45:09 +02:00
parent 117ac243f5
commit 7d12a66c12
25 changed files with 558 additions and 353 deletions

View File

@@ -1,5 +1,5 @@
import { TeamReviewService } from "@/services/team-review-service";
import { AuthService } from "@/services/auth-service";
import { auth } from "@/auth";
import { redirect } from "next/navigation";
import { TeamOverview } from "@/components/team-review/team-overview";
import { SkillMatrix } from "@/components/team-review/skill-matrix";
@@ -13,10 +13,14 @@ export const dynamic = "force-dynamic";
async function TeamReviewPage() {
try {
const { userProfile } = await AuthService.requireAuthenticatedUser();
const session = await auth();
if (!session?.user) {
redirect("/login");
}
const teamData = await TeamReviewService.getTeamReviewData(
userProfile.teamId
session.user.teamId
);
return (