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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user