Improved part of the performance of the dashboards

This commit is contained in:
Tiago Ribeiro
2024-12-24 10:31:52 +00:00
parent f8e9cfbeff
commit 770056e0c4
9 changed files with 110 additions and 85 deletions

View File

@@ -32,7 +32,7 @@ export const getServerSideProps = withIronSessionSsr(async ({ req, res, query })
const { assignment: assignmentID, destination } = query as { assignment?: string, destination?: string }
const destinationURL = !!destination ? Buffer.from(destination, 'base64').toString() : undefined
if (assignmentID) {
if (!!assignmentID) {
const assignment = await getAssignment(assignmentID)
if (!assignment) return redirect(destinationURL || "/exam")