1
0
mirror of https://github.com/Fayorg/calendrier-avant.git synced 2026-05-28 01:28:37 +02:00

add: using nextauth WIP

This commit is contained in:
2023-12-15 15:21:51 +01:00
parent 5f049aad5b
commit 2eaccd52e4
7 changed files with 255 additions and 17 deletions

View File

@@ -1,5 +1,6 @@
import prisma from '@/lib/prisma';
import ActiveCard from './ActiveCard';
import { getAuthServerSession } from '@/lib/authenticate';
export default async function Dashboard() {
const tests = await prisma.test.findMany({ select: { isActive: true, isPassed: true, id: true, testOf: { select: { id: true, firstName: true, lastName: true, isTeacher: true } } } });
@@ -7,6 +8,10 @@ export default async function Dashboard() {
const activeTests = tests.filter((test) => test.isActive);
const passedTests = tests.filter((test) => test.isPassed);
const authSession = await getAuthServerSession();
console.log(authSession);
return (
<div>
<h1>Dashboard</h1>