Skip to content

Commit

Permalink
fix bug?
Browse files Browse the repository at this point in the history
  • Loading branch information
Silabear authored Nov 29, 2023
1 parent 9159eb8 commit 0ac6927
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion routes/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,12 @@ def get_user_projects_by_id(username: str):
t = request.headers.get("Authorization")
user = utilities.get_user.from_username(username)

authed = auth_util.authenticate(t)

if user is None:
return "User not found", 404

if t:
if t and authed and not (type(authed) is int):
if authed.id == user.id:
# Get all submissions
r = util.exec_query(
Expand Down

0 comments on commit 0ac6927

Please sign in to comment.