Skip to content

Commit

Permalink
There
Browse files Browse the repository at this point in the history
  • Loading branch information
JDJGInc authored Apr 25, 2024
1 parent a610c04 commit d00770b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,14 @@ async def stats(code: Optional[str] = None, state: Optional[str] = None):

@app.get("/generate-url", response_class=ORJSONResponse)
async def generate_url(
client_id: int,
user_id: int,
redirect_int: int,
client_id: Optional[int] = None,
user_id: Optional[int] = None,
redirect_int: Optional[int] = None,
):
if not client_id or not user_id or not redirect_int:

data = {"error" : "Please provide a valid integer for (client_id, user_id, and redirect_int)"}
return ORJSONResponse(data, status_code=401)

state = secrets.token_urlsafe(32)
app.state.states[state] = user_id
Expand Down

0 comments on commit d00770b

Please sign in to comment.