Closed mirmirmirr closed 1 month ago
I added a new commit so that the labs displayed depend on the userid value, which is stored as a cookie when they log in; previously, the userid was hardcoded as 1
Do you know if there is a way to check this on our end while we don't have the login connected yet?
Now the user and admin homepages both redirect back to the login page if the userid or admin cookies aren't set, or if you're on the wrong page (e.g. if an admin is on the normal user homepage). If you're on the login page and enter a username and password combination that are in data.json (e.g. "Jane Doe" with "pass1"), it will delete old cookies and set them with the current userid and whether they're an admin, then redirect to the appropriate homepage. If you want to test this with live preview, I recommend opening it in the browser instead of just in VSCode to make sure that the JS works right.
Looks good. Can create an issue for any further problems.