YashasG98 / Multiplayer-Game-Server

A multiplayer game matchmaking server for Snake and Ladders and Connect Four
44 stars 26 forks source link

Added error message to login page if user tries to enter using other pages #32

Closed DelaMarc closed 4 years ago

DelaMarc commented 4 years ago

I made a decorator function taht checks if the user is logged in or and redirects them if they're not. When redirected, an error message is displayed in login.html if the variable 'needLogin' is set in the url. The decorator is called on every on all route the user would normally access once logged in. Thus, it is not anymore necessary to check manually inside the functions if the user is logged in or not.

YashasG98 commented 4 years ago

PR #33 covers all of this I feel. Please close this PR.