mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-01-14 21:54:22 -06:00
Add serializer to satisfy schema check
This commit is contained in:
@@ -1332,6 +1332,11 @@ class DocumentViewSet(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class ChatStreamingSerializer(serializers.Serializer):
|
||||||
|
q = serializers.CharField(required=True)
|
||||||
|
document_id = serializers.IntegerField(required=False, allow_null=True)
|
||||||
|
|
||||||
|
|
||||||
@method_decorator(
|
@method_decorator(
|
||||||
[
|
[
|
||||||
ensure_csrf_cookie,
|
ensure_csrf_cookie,
|
||||||
@@ -1341,6 +1346,7 @@ class DocumentViewSet(
|
|||||||
)
|
)
|
||||||
class ChatStreamingView(GenericAPIView):
|
class ChatStreamingView(GenericAPIView):
|
||||||
permission_classes = (IsAuthenticated,)
|
permission_classes = (IsAuthenticated,)
|
||||||
|
serializer_class = ChatStreamingSerializer
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
request.compress_exempt = True
|
request.compress_exempt = True
|
||||||
|
|||||||
Reference in New Issue
Block a user