Improved part of the performance of the dashboards
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user