From 19f5ba51877070fe3331a6f80aab5eec959b1577 Mon Sep 17 00:00:00 2001 From: Shashank Verma Date: Sat, 30 Sep 2023 10:44:11 +0530 Subject: [PATCH] controller: UserController: Update APIs should be PUT Signed-off-by: Shashank Verma --- .../com/mnnit/moticlubs/controller/UserController.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/mnnit/moticlubs/controller/UserController.kt b/src/main/kotlin/com/mnnit/moticlubs/controller/UserController.kt index 395cee7..e2b4fd0 100644 --- a/src/main/kotlin/com/mnnit/moticlubs/controller/UserController.kt +++ b/src/main/kotlin/com/mnnit/moticlubs/controller/UserController.kt @@ -27,6 +27,7 @@ import org.springframework.http.server.reactive.ServerHttpRequest import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.PostMapping +import org.springframework.web.bind.annotation.PutMapping import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RequestHeader import org.springframework.web.bind.annotation.RequestMapping @@ -113,7 +114,7 @@ class UserController( .wrapError() } - @PostMapping("/avatar") + @PutMapping("/avatar") @Operation(summary = "Updates user avatar") fun updateAvatar(@RequestBody dto: UpdateAvatarDTO): Mono> = pathAuthorization .userAuthorization() @@ -128,7 +129,7 @@ class UserController( } .wrapError() - @PostMapping("/contact") + @PutMapping("/contact") @Operation(summary = "Updates user contact info") fun updateContact(@RequestBody dto: UpdateContactDTO): Mono> = pathAuthorization .userAuthorization() @@ -143,7 +144,7 @@ class UserController( } .wrapError() - @PostMapping("/fcm") + @PutMapping("/fcm") @Operation(summary = "Update fcm token for the user") fun updateFCM(@RequestBody dto: FCMTokenDTO): Mono = pathAuthorization .userAuthorization()