diff --git a/care/facility/api/viewsets/asset.py b/care/facility/api/viewsets/asset.py index 39015327f7..d278ef0d67 100644 --- a/care/facility/api/viewsets/asset.py +++ b/care/facility/api/viewsets/asset.py @@ -121,7 +121,7 @@ def perform_create(self, serializer): serializer.save(facility=self.get_facility()) @extend_schema(tags=["asset_location"]) - @action(methods=["POST"], detail=True) + @action(methods=["POST"], detail=True, url_path="duty_staff") def add_duty_staff(self, request, facility_external_id, external_id): """ Endpoint for assigning staffs to asset location @@ -136,7 +136,7 @@ def add_duty_staff(self, request, facility_external_id, external_id): if count != len(duty_staff): raise ValidationError( - {"duty_staff": "Only Home Facility Doctors ayynd Staffs are allowed"} + {"duty_staff": "Only Home Facility Doctors and Staffs are allowed"} ) users = User.objects.filter(id__in=duty_staff).exclude( @@ -160,7 +160,7 @@ def add_duty_staff(self, request, facility_external_id, external_id): return Response(status=status.HTTP_201_CREATED) @extend_schema(tags=["asset_location"]) - @action(methods=["POST"], detail=True) + @action(methods=["POST"], detail=True, url_path="duty_staff") def remove_duty_staff(self, request, facility_external_id, external_id): """ Endpoint for removing staffs from asset location