mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-19 10:19:27 -05:00
Fix these last document actions
This commit is contained in:
parent
fa18844b92
commit
68ce6345eb
@ -428,16 +428,26 @@ class DocumentTypeViewSet(ModelViewSet, PermissionsAwareDocumentCountMixin):
|
|||||||
notes=extend_schema(
|
notes=extend_schema(
|
||||||
description="View, add, or delete notes for the document",
|
description="View, add, or delete notes for the document",
|
||||||
responses={
|
responses={
|
||||||
200: inline_serializer(
|
200: {
|
||||||
name="Note",
|
"type": "array",
|
||||||
many=True,
|
"items": {
|
||||||
fields={
|
"type": "object",
|
||||||
"id": serializers.IntegerField(),
|
"properties": {
|
||||||
"note": serializers.CharField(),
|
"id": {"type": "integer"},
|
||||||
"created": serializers.DateTimeField(),
|
"note": {"type": "string"},
|
||||||
"user": UserSerializer(),
|
"created": {"type": "string", "format": "date-time"},
|
||||||
|
"user": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {"type": "integer"},
|
||||||
|
"username": {"type": "string"},
|
||||||
|
"first_name": {"type": "string"},
|
||||||
|
"last_name": {"type": "string"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
),
|
|
||||||
400: None,
|
400: None,
|
||||||
403: None,
|
403: None,
|
||||||
404: None,
|
404: None,
|
||||||
@ -476,6 +486,7 @@ class DocumentTypeViewSet(ModelViewSet, PermissionsAwareDocumentCountMixin):
|
|||||||
responses={200: OpenApiTypes.BINARY},
|
responses={200: OpenApiTypes.BINARY},
|
||||||
),
|
),
|
||||||
share_links=extend_schema(
|
share_links=extend_schema(
|
||||||
|
operation_id="document_share_links",
|
||||||
description="View share links for the document",
|
description="View share links for the document",
|
||||||
parameters=[
|
parameters=[
|
||||||
OpenApiParameter(
|
OpenApiParameter(
|
||||||
@ -485,7 +496,18 @@ class DocumentTypeViewSet(ModelViewSet, PermissionsAwareDocumentCountMixin):
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
responses={
|
responses={
|
||||||
200: ShareLinkSerializer(many=True),
|
200: {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {"type": "integer"},
|
||||||
|
"created": {"type": "string", "format": "date-time"},
|
||||||
|
"expiration": {"type": "string", "format": "date-time"},
|
||||||
|
"slug": {"type": "string"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
400: None,
|
400: None,
|
||||||
403: None,
|
403: None,
|
||||||
404: None,
|
404: None,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user