feat: auto-detect podman/docker in agent, add studentId to activation response, fix download URLs
This commit is contained in:
@@ -11,7 +11,8 @@ import { generateActivationCodeAction } from "./actions";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export default async function StudentDetailPage({ params }: { params: { id: string } }) {
|
||||
export default async function StudentDetailPage({ params }: { params: Promise<{ id: string }> }) {
|
||||
const { id } = await params;
|
||||
const session = await getServerSession(authOptions);
|
||||
if (!session?.user) redirect("/login");
|
||||
if (!session.user.establishmentId && session.user.role !== "superadmin") redirect("/dashboard");
|
||||
@@ -19,7 +20,7 @@ export default async function StudentDetailPage({ params }: { params: { id: stri
|
||||
const establishmentId = session.user.establishmentId;
|
||||
const student = await prisma.student.findFirst({
|
||||
where: {
|
||||
id: params.id,
|
||||
id,
|
||||
class: establishmentId ? { establishmentId } : undefined,
|
||||
},
|
||||
include: { class: true },
|
||||
|
||||
Reference in New Issue
Block a user