Skip to content

Commit 247b261

Browse files
author
Adenylatcyclase
committed
forgot to change function names where they are called
1 parent d2a0be6 commit 247b261

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/api/views/oauthView.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ def register_route():
5151
@oauth_authorized.connect
5252
def oathed(blueprint, token):
5353
if session['action'] == 'login':
54-
return login(blueprint)
54+
return login_callback(blueprint)
5555
elif session['action'] == 'register':
56-
return register(blueprint)
56+
return register_callback(blueprint)
5757
else:
5858
return "", 501
5959

@@ -76,7 +76,7 @@ def register_callback(blueprint):
7676
id = resp["id"]
7777
user = userController.get_user(github_id=id)
7878
if not user:
79-
user = userController.create_user(github_id=id, name=session.pop('username'))
79+
user = userController.create_user(github_id=id, name=session.pop('username', "Anton"))
8080
access_token = create_access_token(identity=user)
8181
redirect_token = f"?state={session.pop('state')}&token={access_token}"
8282
return redirect(session.pop('redirect') + redirect_token)

0 commit comments

Comments
 (0)