寻息事件推送bug

This commit is contained in:
曹前明 2022-09-13 17:45:05 +08:00
parent 9c8c6979dd
commit 307447f200
1 changed files with 5 additions and 3 deletions

View File

@ -171,7 +171,7 @@ class XxCommonViewSet(CreateModelMixin, CustomGenericViewSet):
authentication_classes=[], permission_classes=[],
serializer_class=serializers.Serializer, logging_methods=[]) # 日志
def c_location(self, request, pk=None):
loc_change(data=request.data)
loc_change(data=request.data.data)
return Response()
@action(methods=['post'], detail=False,
@ -191,14 +191,16 @@ class XxCommonViewSet(CreateModelMixin, CustomGenericViewSet):
authentication_classes=[], permission_classes=[],
serializer_class=serializers.Serializer, logging_methods=['POST']) # 日志
def c_one_key_alarm(self, request, pk=None):
handle_xx_event(name='one_key_alarm', data=request.data)
data = request.data
handle_xx_event(name='one_key_alarm', data=data.data)
return Response()
@action(methods=['post'], detail=False,
authentication_classes=[], permission_classes=[],
serializer_class=serializers.Serializer, logging_methods=[]) # 日志
def c_lowpower(self, request, pk=None):
handle_xx_event(name='low_power', data=request.data)
data = request.data
handle_xx_event(name='low_power', data=data.data)
return Response()