Add Japanese message string for django.po #25
|
@ -34,7 +34,10 @@ def connect(request):
|
||||||
def authorize(request):
|
def authorize(request):
|
||||||
if request.user.userprofileinfo.discord_id:
|
if request.user.userprofileinfo.discord_id:
|
||||||
return bad_request(request, "Already connected")
|
return bad_request(request, "Already connected")
|
||||||
|
try:
|
||||||
token = oauth.discord.authorize_access_token(request)
|
token = oauth.discord.authorize_access_token(request)
|
||||||
|
except:
|
||||||
|
bad_request(request, "Connection refused")
|
||||||
response = oauth.discord.get('users/@me', token=token)
|
response = oauth.discord.get('users/@me', token=token)
|
||||||
response = response.json()
|
response = response.json()
|
||||||
discord_id = response['id']
|
discord_id = response['id']
|
||||||
|
|
Loading…
Reference in New Issue