Created
August 21, 2023 13:13
-
-
Save brunomichetti/b08ab7902fa08ab8a71f7916b5b6c0dc 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 action | |
@extend_schema( | |
methods=("GET",), | |
parameters=[OpenApiParameter("username", exclude=True)], | |
description="Returns the list of users that have at least one user in charge.", | |
responses=UserListSerializer(many=True), | |
) | |
@extend_schema( | |
methods=("POST",), | |
description="Receives the id of a user and a leader and sets the leader as leader of the user.", | |
request=SetLeaderSerializer, | |
responses=SetLeaderSerializer, | |
) | |
@action(detail=False, methods=("GET", "POST",)) | |
def leaders(self, request): | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment