Skip to content

Commit

Permalink
Merge pull request #1270 from sickelap/use_post_for_delete_missing_ph…
Browse files Browse the repository at this point in the history
…otos

use post for delete missing photos
  • Loading branch information
sickelap committed May 17, 2024
2 parents a8b138b + 70e759e commit bdb4fea
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions api/views/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,17 @@ def _scan_photos(self, request):


class DeleteMissingPhotosView(APIView):
def post(self, request, format=None):
return self._delete_missing_photos(request, format)

@extend_schema(
deprecated=True,
description="Use POST method instead",
)
def get(self, request, format=None):
return self._delete_missing_photos(request, format)

def _delete_missing_photos(self, request, format=None):
try:
job_id = uuid.uuid4()
delete_missing_photos(request.user, job_id)
Expand Down

0 comments on commit bdb4fea

Please sign in to comment.