Yuta Nakamura
commited on
Update the error message for submissions before logging in (#45)
Browse files- competitions/app.py +2 -2
competitions/app.py
CHANGED
@@ -277,7 +277,7 @@ async def new_submission(
|
|
277 |
submission_comment = ""
|
278 |
|
279 |
if user_token is None:
|
280 |
-
return {"response": "Invalid token"}
|
281 |
|
282 |
todays_date = datetime.datetime.now()
|
283 |
start_date = datetime.datetime.strptime(START_DATE, "%Y-%m-%d")
|
@@ -343,7 +343,7 @@ def update_team_name(
|
|
343 |
new_team_name = body.new_team_name
|
344 |
|
345 |
if user_token is None:
|
346 |
-
return {"success": False, "error": "Invalid token"}
|
347 |
|
348 |
if str(new_team_name).strip() == "":
|
349 |
return {"success": False, "error": "Team name cannot be empty."}
|
|
|
277 |
submission_comment = ""
|
278 |
|
279 |
if user_token is None:
|
280 |
+
return {"response": "Invalid token. Please login."}
|
281 |
|
282 |
todays_date = datetime.datetime.now()
|
283 |
start_date = datetime.datetime.strptime(START_DATE, "%Y-%m-%d")
|
|
|
343 |
new_team_name = body.new_team_name
|
344 |
|
345 |
if user_token is None:
|
346 |
+
return {"success": False, "error": "Invalid token. Please login."}
|
347 |
|
348 |
if str(new_team_name).strip() == "":
|
349 |
return {"success": False, "error": "Team name cannot be empty."}
|