fix: removed unused import
This commit is contained in:
parent
25ec9c2e50
commit
7b409d5114
|
@ -1,13 +1,12 @@
|
||||||
import prisma from '@/lib/prisma';
|
import prisma from '@/lib/prisma';
|
||||||
import ActiveCard from './ActiveCard';
|
import ActiveCard from './ActiveCard';
|
||||||
import { getAuthServerSession } from '@/lib/authenticate';
|
import { getAuthServerSession } from '@/lib/authenticate';
|
||||||
import { red } from 'next/dist/lib/picocolors';
|
|
||||||
import { redirect } from 'next/navigation';
|
import { redirect } from 'next/navigation';
|
||||||
|
|
||||||
export default async function Dashboard() {
|
export default async function Dashboard() {
|
||||||
const authSession = await getAuthServerSession();
|
const authSession = await getAuthServerSession();
|
||||||
console.log(authSession);
|
console.log(authSession);
|
||||||
if (!authSession || !authSession.user.isTeacher) return redirect('/');
|
if (!authSession) return redirect('/');
|
||||||
|
|
||||||
const tests = await prisma.test.findMany({ select: { isActive: true, isPassed: true, id: true, testOf: { select: { id: true, firstName: true, lastName: true, isTeacher: true } } } });
|
const tests = await prisma.test.findMany({ select: { isActive: true, isPassed: true, id: true, testOf: { select: { id: true, firstName: true, lastName: true, isTeacher: true } } } });
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue