portfolio
Toggle table of contents
0.0.1-SNAPSHOT
jvm
Platform filter
jvm
Switch theme
Search in API
portfolio
portfolio
/
org.project.portfolio.article.presentation
/
ArticleAuthorController
/
updateArticle
update
Article
@
PatchMapping
(
value
=
[
"/{articleId}"
]
,
consumes
=
[
"multipart/form-data"
]
)
@
PreAuthorize
(
value
=
"isAuthenticated() and (hasRole('ROLE_ADMIN') or @articleValidator.isEditable(#articleId, #userDetails.username))"
)
fun
updateArticle
(
@
AuthenticationPrincipal
userDetails
:
UserDetails
,
@
PathVariable
articleId
:
Long
,
@
Valid
@
ModelAttribute
articleUpdateForm
:
ArticleUpdateForm
)
:
ResponseEntity
<
ArticleResponse
>