Fix KeyError when accessing feed, stats, games, and chat without logging in
IsaacCheng9 opened this issue · comments
Problem Statement
- When accessing feed, stats (leaderboard, achievements), games (quizzes, flashcards), or chat without logging in, a
KeyError: 'username'
occurs.- This can be fixed by implementing the
@login_required
annotation with Flask, and hiding these items from the navigation bar when the user isn't logged in.- It may be better to hide the navigation bar entirely when the user isn't logged in.
- This can be fixed by implementing the