Cleanup frontend comment service & other code

[ci skip]
This commit is contained in:
Michael Shamoon
2022-08-07 22:05:32 -07:00
parent bf1f65dc89
commit 765e27f719
9 changed files with 20 additions and 24 deletions

View File

@@ -414,7 +414,7 @@ class DocumentViewSet(
try:
c = Comment.objects.create(
document=doc,
comment=request.data["payload"],
comment=request.data["comment"],
user=currentUser,
)
c.save()
@@ -427,7 +427,7 @@ class DocumentViewSet(
},
)
elif request.method == "DELETE":
comment = Comment.objects.get(id=int(request.GET.get("commentId")))
comment = Comment.objects.get(id=int(request.GET.get("id")))
comment.delete()
return Response(self.getComments(doc))

View File

@@ -566,6 +566,7 @@ CONVERT_MEMORY_LIMIT = os.getenv("PAPERLESS_CONVERT_MEMORY_LIMIT")
GS_BINARY = os.getenv("PAPERLESS_GS_BINARY", "gs")
# Pre-2.x versions of Paperless stored your documents locally with GPG
# encryption, but that is no longer the default. This behaviour is still
# available, but it must be explicitly enabled by setting