mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 23:28:26 +02:00
Added actions and tasks to purge domains and actors
This commit is contained in:
parent
833daa242c
commit
233ac870be
10 changed files with 251 additions and 14 deletions
|
@ -2,7 +2,7 @@ from rest_framework import mixins, response, viewsets
|
|||
from rest_framework.decorators import detail_route, list_route
|
||||
from django.shortcuts import get_object_or_404
|
||||
|
||||
from funkwhale_api.common import preferences
|
||||
from funkwhale_api.common import preferences, decorators
|
||||
from funkwhale_api.federation import models as federation_models
|
||||
from funkwhale_api.federation import tasks as federation_tasks
|
||||
from funkwhale_api.music import models as music_models
|
||||
|
@ -135,6 +135,8 @@ class ManageDomainViewSet(
|
|||
domain = self.get_object()
|
||||
return response.Response(domain.get_stats(), status=200)
|
||||
|
||||
action = decorators.action_route(serializers.ManageDomainActionSerializer)
|
||||
|
||||
|
||||
class ManageActorViewSet(
|
||||
mixins.ListModelMixin, mixins.RetrieveModelMixin, viewsets.GenericViewSet
|
||||
|
@ -175,6 +177,8 @@ class ManageActorViewSet(
|
|||
domain = self.get_object()
|
||||
return response.Response(domain.get_stats(), status=200)
|
||||
|
||||
action = decorators.action_route(serializers.ManageActorActionSerializer)
|
||||
|
||||
|
||||
class ManageInstancePolicyViewSet(
|
||||
mixins.ListModelMixin,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue