✨(contacts) add "abilities" to API endpoint data
Returns the possible actions to the frontend using the model's `get_abilities`.
This commit is contained in:
@@ -137,7 +137,7 @@ class ContactViewSet(
|
||||
"""Contact ViewSet"""
|
||||
|
||||
permission_classes = [permissions.AccessPermission]
|
||||
queryset = models.Contact.objects.all()
|
||||
queryset = models.Contact.objects.select_related("user").all()
|
||||
serializer_class = serializers.ContactSerializer
|
||||
throttle_classes = [BurstRateThrottle, SustainedRateThrottle]
|
||||
ordering_fields = ["full_name", "short_name", "created_at"]
|
||||
|
||||
Reference in New Issue
Block a user