Skip to content

Commit

Permalink
controller: UserController: Update APIs should be PUT
Browse files Browse the repository at this point in the history
Signed-off-by: Shashank Verma <shashank.verma2002@gmail.com>
  • Loading branch information
shank03 committed Sep 30, 2023
1 parent 73c17e6 commit 19f5ba5
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -113,7 +114,7 @@ class UserController(
.wrapError()
}

@PostMapping("/avatar")
@PutMapping("/avatar")
@Operation(summary = "Updates user avatar")
fun updateAvatar(@RequestBody dto: UpdateAvatarDTO): Mono<ResponseEntity<User>> = pathAuthorization
.userAuthorization()
Expand All @@ -128,7 +129,7 @@ class UserController(
}
.wrapError()

@PostMapping("/contact")
@PutMapping("/contact")
@Operation(summary = "Updates user contact info")
fun updateContact(@RequestBody dto: UpdateContactDTO): Mono<ResponseEntity<User>> = pathAuthorization
.userAuthorization()
Expand All @@ -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<FCM> = pathAuthorization
.userAuthorization()
Expand Down

0 comments on commit 19f5ba5

Please sign in to comment.