Skip to content

Commit

Permalink
add cf api error
Browse files Browse the repository at this point in the history
  • Loading branch information
phattd15 committed Apr 1, 2022
1 parent bd1afb1 commit 530ea60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ def register(request):
context["error"] = []
context["contest_id"] = ""
context["index"] = ""
api_is_down = not validate_handle("tourist")

if api_is_down:
context["error"].append(("The Codeforces API is currently unavailable, please comeback later", False))

if request.method == "POST":
username = request.POST.get("username")
Expand Down

0 comments on commit 530ea60

Please sign in to comment.