Skip to content

Commit

Permalink
fix: reduce join code length for event creation
Browse files Browse the repository at this point in the history
The docs say that each byte is roughly 1.3 characters and from some testing, it seems that it consistently outputs 4 characters
  • Loading branch information
slashtechno committed Jan 26, 2025
1 parent 2eb0c27 commit 344c27c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/podium/routers/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def create_event(

# Generate a unique join code by continuously generating a new one until it doesn't match any existing join codes
while True:
join_code = token_urlsafe(4).upper()
join_code = token_urlsafe(3).upper()
if not db.events.first(formula=match({"join_code": join_code})):
event.join_code = join_code
break
Expand Down

0 comments on commit 344c27c

Please sign in to comment.