mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 15:25:41 +01:00
Cleanup frontend comment service & other code
[ci skip]
This commit is contained in:
parent
1b56ffd0c0
commit
1d2282df9e
9 changed files with 20 additions and 24 deletions
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue