Skip to content

Commit af271b2

Browse files
committed
refactor(decommission): delete instead of post
1 parent 7afedcb commit af271b2

File tree

1 file changed

+2
-2
lines changed
  • netbox_cmdb/netbox_cmdb/api/cmdb

1 file changed

+2
-2
lines changed

netbox_cmdb/netbox_cmdb/api/cmdb/views.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class DeleteAllCMDBObjectsRelatedToDevice(APIView):
2727
status.HTTP_500_INTERNAL_SERVER_ERROR: "Internal Server Error: Something went wrong on the server",
2828
},
2929
)
30-
def post(self, request):
30+
def delete(self, request):
3131
device_name = request.data.get("device_name", None)
3232
if device_name is None:
3333
return Response(
@@ -73,7 +73,7 @@ class DecommissionSite(APIView):
7373
status.HTTP_500_INTERNAL_SERVER_ERROR: "Internal Server Error: Something went wrong on the server",
7474
},
7575
)
76-
def post(self, request):
76+
def delete(self, request):
7777
site_name = request.data.get("site_name", None)
7878
if site_name is None:
7979
return Response({"error": "site name is required"}, status=status.HTTP_400_BAD_REQUEST)

0 commit comments

Comments
 (0)