diff --git a/apps/accounts/api/account/account.py b/apps/accounts/api/account/account.py index 63ec374df..5598f5f7b 100644 --- a/apps/accounts/api/account/account.py +++ b/apps/accounts/api/account/account.py @@ -30,7 +30,7 @@ class AccountViewSet(OrgBulkModelViewSet): 'partial_update': ['accounts.change_account'], 'su_from_accounts': 'accounts.view_account', 'username_suggestions': 'accounts.view_account', - 'remove_secret': 'accounts.change_account', + 'clear_secret': 'accounts.change_account', } @action(methods=['get'], detail=False, url_path='su-from-accounts') @@ -73,8 +73,8 @@ class AccountViewSet(OrgBulkModelViewSet): usernames = common + others return Response(data=usernames) - @action(methods=['patch'], detail=False, url_path='remove-secret') - def remove_secret(self, request, *args, **kwargs): + @action(methods=['patch'], detail=False, url_path='clear-secret') + def clear_secret(self, request, *args, **kwargs): account_ids = request.data.get('account_ids', []) self.model.objects.filter(id__in=account_ids).update(secret=None) return Response(status=HTTP_200_OK)