Skip to content

Commit

Permalink
fix urls
Browse files Browse the repository at this point in the history
  • Loading branch information
jefer94 committed Sep 11, 2024
1 parent 757dca1 commit b9a937a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions breathecode/authenticate/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@
path("password/<str:token>", pick_password, name="password_token"),
path("github/", get_github_token, name="github"),
path("github/me", GithubMeView.as_view(), name="github_me"),
path("github/<str:token>", get_github_token, name="github_token"),
path("github/callback/", save_github_token, name="github_callback"),
path("github/<str:token>", get_github_token, name="github_token"),
path("slack/", get_slack_token, name="slack"),
path("slack/callback/", save_slack_token, name="slack_callback"),
path("facebook/", get_facebook_token, name="facebook"),
Expand All @@ -144,8 +144,8 @@
path("user/me/invite/<slug:new_status>", MeInviteView.as_view(), name="user_me_invite_status"),
path("academy/settings", AcademyAuthSettingsView.as_view(), name="academy_me_settings"),
# google authentication oath2.0
path("google/callback", save_google_token, name="google_callback"),
path("google/<str:token>", get_google_token, name="google_token"),
path("google/callback/", save_google_token, name="google_callback"),
path("gitpod/sync", sync_gitpod_users_view, name="sync_gitpod_users"),
# sync with gitHUB
path("academy/github/user", GithubUserView.as_view(), name="github_user"),
Expand Down
8 changes: 1 addition & 7 deletions breathecode/authenticate/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import urllib.parse
from datetime import timedelta
from urllib.parse import parse_qs, urlencode
import aiohttp

import requests
from adrf.decorators import api_view
Expand Down Expand Up @@ -2004,7 +2005,6 @@ def login_html_view(request):
@api_view(["GET"])
@permission_classes([AllowAny])
def get_google_token(request, token=None):

if token == None:
raise ValidationException("No session token has been specified", slug="no-session-token")

Expand Down Expand Up @@ -2042,12 +2042,6 @@ def get_google_token(request, token=None):
return HttpResponseRedirect(redirect_to=redirect)


# Create your views here.


import aiohttp


@api_view(["GET"])
@permission_classes([AllowAny])
async def save_google_token(request):
Expand Down

0 comments on commit b9a937a

Please sign in to comment.