Closed aryan9600 closed 4 years ago
I didn't get it, can u explain a bit more about it.
The User
and UserStatus
are linked to each other via a foreign key. When the client hits /api/v1/users/me, along with returning the fields in the User
table such as email
, username
, points
, etc. we also need to return the fields in the UserStatus
table for that user. For serializing data which involves relationships we generally use a nested serializer approach.
Is your feature request related to a problem? Please describe. The client needs to know the status of the user (for eg: whether the hint has been used or not), in order to render UI accordingly.
Describe the solution you'd like Add the UserStatus fields in the response, by creating a nested serializer.