Skip to content

Commit

Permalink
feat(core): allow discord_id that has more than 18 digits
Browse files Browse the repository at this point in the history
  • Loading branch information
MagneticNeedle committed Jul 8, 2023
1 parent 0fc16e1 commit 314ae21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bfportal/core/models/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def get_context(self, request, *args, **kwargs): # noqa: D102
def root_profile_page(self, request): # noqa: D102
return redirect("/")

@route(r"^(\d{18})/$", name="discord_id")
@route(r"^(\d{18,})/$", name="discord_id")
def profile_page_view(self, request: HttpRequest, discord_id):
"""Serves a profile page for a user ID"""
user = social_user(discord_id)
Expand All @@ -162,7 +162,7 @@ def profile_page_view(self, request: HttpRequest, discord_id):
else:
return HttpResponse("Nope", status=404)

@route(r"(\d{18})/experiences/$", name="discord_id")
@route(r"(\d{18,})/experiences/$", name="discord_id")
def user_experiences(self, request, discord_id):
"""Servers a list of experiences by a user"""
user = social_user(discord_id=discord_id)
Expand All @@ -176,7 +176,7 @@ def user_experiences(self, request, discord_id):
else:
return TemplateResponse(request, "404.html", status=404)

@route(r"(\d{18})/liked/$", name="discord_id")
@route(r"(\d{18,})/liked/$", name="discord_id")
def user_liked_experiences(self, request, discord_id):
"""Servers a list of experiences by a user"""
user = social_user(discord_id=discord_id)
Expand Down

0 comments on commit 314ae21

Please sign in to comment.