Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
api 추가 및 리팩토링
Browse files Browse the repository at this point in the history
  • Loading branch information
ori0o0p committed Feb 22, 2024
1 parent cb108fb commit 1abdd74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@ public Mono<Void> profileUpload(@RequestPart(value = "file", required = true) Fi

@PatchMapping("/password")
@ResponseStatus(HttpStatus.NO_CONTENT)
public Mono<Void> changePassword(@Valid @RequestBody ChangePasswordRequest request) {
public Mono<Void> changePasswordCurrentUser(@Valid @RequestBody ChangePasswordRequest request) {
return changePasswordService.currentUser(request);
}

@PatchMapping()
@ResponseStatus(HttpStatus.NO_CONTENT)
public Mono<Void> changePasswordNonLoggedInUser (@Valid @RequestBody ChangePasswordRequest request) {
return changePasswordService.nonLoggedInUser(request);
}

@GetMapping("/gen")
public Flux<GetUserResponse> getUserByGen(@NotNull @RequestParam Integer param) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public Mono<Void> currentUser(ChangePasswordRequest request) {
.flatMap(user -> changePasswordAndSaveUser(request.newPassword(), user));
}

public Mono<Void> NonLoggedInUser(ChangePasswordRequest request) {
public Mono<Void> nonLoggedInUser(ChangePasswordRequest request) {
return userFacade.findByEmailNotNull(request.email())
.flatMap(user -> authMailRepository.findByMail(request.email())
.flatMap(verified -> {
Expand Down

0 comments on commit 1abdd74

Please sign in to comment.