Created
August 21, 2023 13:14
-
-
Save brunomichetti/065ed6ec6dd06d34260b4af4c93edeaa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this to the UserViewSet | |
@action(detail=False, methods=("GET",)) | |
def metrics(self, request): | |
""" | |
Calculates and returns the metrics of the users. | |
""" | |
metrics_dict = get_user_metrics() | |
return Response(metrics_dict, status.HTTP_200_OK) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment