Skip to content

Commit

Permalink
Merge pull request #127 from UMC-CommonPlant/feat/#18_Place
Browse files Browse the repository at this point in the history
[Chore] place log 추가
  • Loading branch information
hweyoung authored May 29, 2024
2 parents 39c86a7 + c481a0b commit 5cf3753
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class PlaceContoller implements PlaceSwagger{

@GetMapping("/health")
public ResponseEntity<String> healthCheck(){
log.info("[API] healthCheck");
return ResponseEntity.ok("health check ok");
}

Expand All @@ -42,6 +43,7 @@ public ResponseEntity<String> healthCheck(){
consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<JsonResponse> createPlace(@RequestPart("place") PlaceDto.createPlaceReq req, @RequestPart(value = "image", required = false) MultipartFile image)
{
log.info("[API] createPlace");
String uuid = jwtService.resolveToken();
User user = userService.getUser(uuid);
String placeCode = placeService.create(user, req, image);
Expand All @@ -51,6 +53,7 @@ public ResponseEntity<JsonResponse> createPlace(@RequestPart("place") PlaceDto.c
@GetMapping("/{code}")
public ResponseEntity<JsonResponse> getPlace(@PathVariable("code") String code)
{
log.info("[API] getPlace");
String uuid = jwtService.resolveToken();
User user = userService.getUser(uuid);
placeService.userOnPlace(user, code);
Expand All @@ -62,6 +65,7 @@ public ResponseEntity<JsonResponse> getPlace(@PathVariable("code") String code)
@GetMapping("/weather/{code}")
public ResponseEntity<JsonResponse> getPlaceWeather(@PathVariable("code") String code)
{
log.info("[API] getPlaceWeather");
String uuid = jwtService.resolveToken();
User user = userService.getUser(uuid);
PlaceDto.getPlaceGridRes placeGrid = placeService.getPlaceGrid(user, code);
Expand All @@ -71,6 +75,7 @@ public ResponseEntity<JsonResponse> getPlaceWeather(@PathVariable("code") String
// //친구 요청
@PostMapping("/friends")
public ResponseEntity<JsonResponse> newFriends(@RequestBody PlaceDto.newFriendsReq req){
log.info("[API] newFriends");
String uuid = jwtService.resolveToken();
User user = userService.getUser(uuid);

Expand All @@ -93,6 +98,7 @@ public ResponseEntity<JsonResponse> newFriends(@RequestBody PlaceDto.newFriendsR
// 메인페이지
@GetMapping("/myGarden")
public ResponseEntity<JsonResponse> getMyGarden(){
log.info("[API] getMyGarden");
String uuid = jwtService.resolveToken();
User user = userService.getUser(uuid);
String name = user.getName();
Expand All @@ -110,6 +116,7 @@ public ResponseEntity<JsonResponse> getMyGarden(){
// 사용자가 속한 장소 리스트
@GetMapping("/user")
public ResponseEntity<JsonResponse> getPlaceBelongUser(){
log.info("[API] getPlaceBelongUser");
String uuid = jwtService.resolveToken();
User user = userService.getUser(uuid);

Expand All @@ -121,6 +128,7 @@ public ResponseEntity<JsonResponse> getPlaceBelongUser(){
// 친구 리스트 조회
@GetMapping("/{code}/friends")
public ResponseEntity<JsonResponse> getPlaceFriends(@PathVariable String code){
log.info("[API] getPlaceFriends");
String uuid = jwtService.resolveToken();
User user = userService.getUser(uuid);

Expand Down

0 comments on commit 5cf3753

Please sign in to comment.