Skip to content

Commit dbef693

Browse files
committed
Removed unused stuff.
1 parent ce7ba74 commit dbef693

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/main/kotlin/no/nav/klage/document/service/CommentService.kt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package no.nav.klage.document.service
22

3-
import no.nav.klage.document.api.views.CommentView
43
import no.nav.klage.document.domain.Comment
54
import no.nav.klage.document.exceptions.MissingAccessException
65
import no.nav.klage.document.repositories.CommentRepository
@@ -76,18 +75,6 @@ class CommentService(private val commentRepository: CommentRepository) {
7675
if (!loggedInIsDocumentOwner && comment.authorIdent != loggedInIdent) {
7776
throw MissingAccessException("Not allowed to delete others comment when not document owner")
7877
}
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-
)
9178
commentRepository.delete(comment)
9279

9380
return comment

0 commit comments

Comments
 (0)