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))