Fakultas Ilmu Komputer UI

Commit dd1553d5 authored by Bimo Iman Smartadi's avatar Bimo Iman Smartadi
Browse files

[REFACTOR] Removed commented code

parent 2d084967
Pipeline #48643 passed with stages
in 9 minutes and 6 seconds
......@@ -57,22 +57,7 @@ def request_token(request):
else:
response["response"] = "Wrong password"
return JsonResponse(response, status=400)
'''
if user.is_active:
#token = RefreshToken(user)
payload = {'username':email, 'password':user.password}
token = requests.post("/request-token/", data=payload)
token = token['token']
response = {}
response['username'] = user.username
response['token'] = token
#response['refresh_token'] = str(token)
return JsonResponse(response, status=200)
else:
response["response"] = "Please activate your account"
return JsonResponse(response, status=404)
'''
@csrf_exempt
def _request_token_from_google(email, access_token):
payload = {'access_token': access_token} # validate the token
......@@ -92,7 +77,7 @@ def _request_token_from_google(email, access_token):
BisaGoUser.objects.create(user=user, phone_number=random_generated_phone_number)
return user, 200
'''
@csrf_exempt
def validate_google_token(email, access_token):
payload = {'access_token': access_token} # validate the token
......@@ -102,7 +87,6 @@ def validate_google_token(email, access_token):
content = {'message': 'wrong google token / this google token is already expired.'}
return None, JsonResponse(content, status=404)
return User.objects.get(email=email)
'''
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment