feat: 命令及录像存储可连接性定时检查 (#10594)

Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
fit2bot
2023-05-30 18:45:51 +08:00
committed by GitHub
parent 312213f1c5
commit 3626bf8df6
6 changed files with 104 additions and 15 deletions

View File

@@ -1,12 +1,12 @@
from rest_framework.mixins import ListModelMixin, UpdateModelMixin, RetrieveModelMixin
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework.views import APIView
from common.api import JMSGenericViewSet
from common.permissions import IsValidUser
from notifications.notifications import system_msgs
from notifications.models import SystemMsgSubscription, UserMsgSubscription
from notifications.backends import BACKEND
from notifications.models import SystemMsgSubscription, UserMsgSubscription
from notifications.notifications import system_msgs
from notifications.serializers import (
SystemMsgSubscriptionSerializer, SystemMsgSubscriptionByCategorySerializer,
UserMsgSubscriptionSerializer,
@@ -32,9 +32,9 @@ class BackendListView(APIView):
return Response(data=data)
class SystemMsgSubscriptionViewSet(ListModelMixin,
UpdateModelMixin,
JMSGenericViewSet):
class SystemMsgSubscriptionViewSet(
ListModelMixin, UpdateModelMixin, JMSGenericViewSet
):
lookup_field = 'message_type'
queryset = SystemMsgSubscription.objects.all()
serializer_classes = {