Skip to content

Commit

Permalink
fix(asset): fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
aeswibon committed Nov 27, 2023
1 parent 9b32b4b commit 80f2dfb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions care/facility/api/viewsets/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand All @@ -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
Expand Down

0 comments on commit 80f2dfb

Please sign in to comment.