Fix context

This commit is contained in:
AndrewTrieu
2023-03-10 16:52:00 +02:00
parent 0fab2411ee
commit ee0936c8b1
5 changed files with 6 additions and 714 deletions

View File

@@ -1,7 +1,7 @@
const restrictedPaths = ["/quiz", "/topics"];
const restrictedPaths = ["/topics", "/quiz"];
const authMiddleware = async (state, next) => {
const user = await state.session.get("user");
const authMiddleware = async (context, next) => {
const user = await context.state.session?.get("user");
if (
!user &&