@@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.Operation
4
4
import io.swagger.v3.oas.annotations.tags.Tag
5
5
import no.nav.klage.document.api.views.CommentInput
6
6
import no.nav.klage.document.api.views.CommentView
7
+ import no.nav.klage.document.api.views.ModifyCommentInput
7
8
import no.nav.klage.document.config.SecurityConfiguration.Companion.ISSUER_AAD
8
9
import no.nav.klage.document.domain.Comment
9
10
import no.nav.klage.document.service.CommentService
@@ -87,17 +88,17 @@ class CommentsController(
87
88
summary = " Modify a given comment" ,
88
89
description = " Modify a given comment"
89
90
)
90
- @PostMapping (" /{commentId}/replies " )
91
+ @PatchMapping (" /{commentId}" )
91
92
fun modifyComment (
92
93
@PathVariable(" documentId" ) documentId : UUID ,
93
94
@PathVariable(" commentId" ) commentId : UUID ,
94
- @RequestBody commentInput : CommentInput ,
95
+ @RequestBody modifyCommentInput : ModifyCommentInput ,
95
96
): CommentView {
96
97
log(" modifyComment called with id $documentId and commentId $commentId " )
97
98
return mapCommentToView(
98
99
commentService.modifyCommentText(
99
100
commentId = commentId,
100
- text = commentInput .text,
101
+ text = modifyCommentInput .text,
101
102
loggedInIdent = getIdent()!!
102
103
)
103
104
)
0 commit comments