Skip to content

Commit

Permalink
Merge pull request #384 from mash-up-kr/feature/fix-change-admin-pwd
Browse files Browse the repository at this point in the history
fix url path and name convention
  • Loading branch information
kh0712 authored Dec 4, 2023
2 parents 2747dd7 + 7112732 commit 23d36a6
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public ApiResponse<EmptyResponse> deleteAdminMembers(
return ApiResponse.success();
}

@PostMapping("/{adminId}/password/change")
@PostMapping("/password/change")
public ApiResponse<EmptyResponse> changePassword(
@ApiIgnore @ModelAttribute("adminId") Long adminMemberId,
@RequestBody AdminPasswordChangeRequest request
Expand All @@ -79,18 +79,18 @@ public ApiResponse<EmptyResponse> changePassword(
@ApiOperation("어드민 멤버 리스트 조회")
@GetMapping
public ApiResponse<List<AdminMemberResponse>> readAdminMembers() {
List<AdminMemberVo> data = adminMemberFacadeService.readAdminMembers();
final List<AdminMemberVo> adminMemberVos = adminMemberFacadeService.readAdminMembers();

return ApiResponse.success(data.stream().map(AdminMemberResponse::from).collect(Collectors.toList()));
return ApiResponse.success(adminMemberVos.stream().map(AdminMemberResponse::from).collect(Collectors.toList()));
}

/** 어드민 멤버 생성 */
@ApiOperation("어드민 멤버 생성")
@PreAuthorize("hasAnyAuthority('MASHUP_LEADER', 'MASHUP_SUBLEADER')")
@PostMapping
public ApiResponse<AdminMemberResponse> createAdminMember(@RequestBody AdminMemberSignUpCommand signUpCommand) {
AdminMemberVo data = adminMemberFacadeService.createAdminMember(signUpCommand);
final AdminMemberVo adminMemberVo = adminMemberFacadeService.createAdminMember(signUpCommand);

return ApiResponse.success(AdminMemberResponse.from(data));
return ApiResponse.success(AdminMemberResponse.from(adminMemberVo));
}
}

0 comments on commit 23d36a6

Please sign in to comment.