@@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.Operation
44import io.swagger.v3.oas.annotations.tags.Tag
55import no.nav.klage.document.api.views.CommentInput
66import no.nav.klage.document.api.views.CommentView
7+ import no.nav.klage.document.api.views.ModifyCommentInput
78import no.nav.klage.document.config.SecurityConfiguration.Companion.ISSUER_AAD
89import no.nav.klage.document.domain.Comment
910import no.nav.klage.document.service.CommentService
@@ -87,17 +88,17 @@ class CommentsController(
8788 summary = " Modify a given comment" ,
8889 description = " Modify a given comment"
8990 )
90- @PostMapping (" /{commentId}/replies " )
91+ @PatchMapping (" /{commentId}" )
9192 fun modifyComment (
9293 @PathVariable(" documentId" ) documentId : UUID ,
9394 @PathVariable(" commentId" ) commentId : UUID ,
94- @RequestBody commentInput : CommentInput ,
95+ @RequestBody modifyCommentInput : ModifyCommentInput ,
9596 ): CommentView {
9697 log(" modifyComment called with id $documentId and commentId $commentId " )
9798 return mapCommentToView(
9899 commentService.modifyCommentText(
99100 commentId = commentId,
100- text = commentInput .text,
101+ text = modifyCommentInput .text,
101102 loggedInIdent = getIdent()!!
102103 )
103104 )
0 commit comments