Is your feature request related to a problem? Please describe.
The frontend would like to receive the time remaining till the user's XP increases by 10 (as a result of the hourly generation feature), along with the user details
Describe the solution you'd like
Store the timestamp of the first attempt as a DateTimeField in the User table. Calculate the time remaining till the XP is increased and return it in the user response. One way of doing this would be using a SerializerMethodField in the UserStatusSerializer and including that field in the fields attribute of that serializer.
Is your feature request related to a problem? Please describe. The frontend would like to receive the time remaining till the user's XP increases by 10 (as a result of the hourly generation feature), along with the user details
Describe the solution you'd like Store the timestamp of the first attempt as a
DateTimeField
in theUser
table. Calculate the time remaining till the XP is increased and return it in the user response. One way of doing this would be using a SerializerMethodField in the UserStatusSerializer and including that field in the fields attribute of that serializer.