Fakultas Ilmu Komputer UI

Commit 6ec0c18e authored by Glenda Emanuella Sutanto's avatar Glenda Emanuella Sutanto

Merge branch 'change-google-login-serializer' into 'staging'

Change google view serializer with user auth serializer

See merge request !73
parents a7af13ae fe819d52
Pipeline #79714 passed with stages
in 24 minutes and 19 seconds
......@@ -11,7 +11,7 @@ from dietela_quiz.serializers import DietProfileSerializer
from payment.models import Cart
from payment.serializers import CartSerializer
from .models import CustomUser
from .serializers import CustomUserDetailsSerializer, CustomLoginSerializer
from .serializers import CustomUserDetailsSerializer, CustomLoginSerializer, UserAuthSerializer
from .google_utils import validate_google_token
from .utilities import get_first_deadline
......@@ -77,7 +77,7 @@ class GoogleView(APIView):
)
token = RefreshToken.for_user(user) # generate token
response = {}
response['user'] = CustomUserDetailsSerializer(user).data
response['user'] = UserAuthSerializer(user).data
response['access_token'] = str(token.access_token)
response['refresh_token'] = str(token)
return Response(response)
Markdown is supported
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