Skip to content

Commit

Permalink
[#5] 습관 수정 API 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jun108059 committed Oct 18, 2021
1 parent dba1956 commit 7222313
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,17 @@ public ResponseEntity<Long> deleteHabit(
return ResponseEntity.ok().body(habitService.deleteHabit(member.getMemIdx(), habitIdx));
}

@Operation(summary = "✅ 습관 수정 API",
description = "습관을 수정해요.",
security = @SecurityRequirement(name = "bearerAuth"),
responses = {
@ApiResponse(responseCode = "200", description = "[Ok] Change habit Done",
content = @Content(array = @ArraySchema(schema = @Schema(implementation = HabitDto.AllHabitRes.class))))})
@PutMapping("/v1/habit")
public ResponseEntity<HabitDto.HabitRes> updateHabit(
@Parameter(hidden = true) Authentication authentication,
@Parameter(description = "업데이트할 습관 정보", required = true) @RequestBody @Valid HabitDto.UpdateHabitReq dto) {
return ResponseEntity.ok().body(habitService.update(dto));
}

}

0 comments on commit 7222313

Please sign in to comment.