I'm using angular 5 front end and django as back end. I use JWT token to communicate between django to angular. How can I get logged user details in backend using token.
EG:
class PostSerializer(ModelSerializer):
class Meta:
model = PostDetail
fields = [
'title',
'upvote',
]
Here upvote is a many to many field contain all voted user list. I want to add one more field "user_vote_status" to check the vote status of logged in user.
I'm using angular 5 front end and django as back end. I use JWT token to communicate between django to angular. How can I get logged user details in backend using token.
EG: class PostSerializer(ModelSerializer): class Meta: model = PostDetail fields = [ 'title', 'upvote', ] Here upvote is a many to many field contain all voted user list. I want to add one more field "user_vote_status" to check the vote status of logged in user.
How can I figure out this issue, please help me.