File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed
src/main/kotlin/no/nav/klage/document/service Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change 1
1
package no.nav.klage.document.service
2
2
3
- import no.nav.klage.document.api.views.CommentView
4
3
import no.nav.klage.document.domain.Comment
5
4
import no.nav.klage.document.exceptions.MissingAccessException
6
5
import no.nav.klage.document.repositories.CommentRepository
@@ -76,18 +75,6 @@ class CommentService(private val commentRepository: CommentRepository) {
76
75
if (! loggedInIsDocumentOwner && comment.authorIdent != loggedInIdent) {
77
76
throw MissingAccessException (" Not allowed to delete others comment when not document owner" )
78
77
}
79
-
80
- val commentCopy = Comment (
81
- id = commentId,
82
- parentCommentId = comment.parentCommentId,
83
- documentId = comment.documentId,
84
- text = " " ,
85
- authorName = comment.authorName,
86
- authorIdent = comment.authorIdent,
87
- comments = comment.comments,
88
- created = comment.created,
89
- modified = LocalDateTime .now(),
90
- )
91
78
commentRepository.delete(comment)
92
79
93
80
return comment
You can’t perform that action at this time.
0 commit comments