1👍
✅
Authorization:Token eb979cb6f179dd2d9056023685e2d02e4e65a58e
Makes me think you need to enable token authentication on that view.
#view to get a specific exercise for a particular user
@api_view(('GET',))
def get_single_exercise_for_user_id(request, exerciseId):
results = Exercise_state_ui_model.fetch_exercises(request.user.id, exerciseId)
serializer = ExerciseStateSerializer(results, many=True)
return Response(serializer.data)
Source:stackexchange.com