Skip to content

Commit

Permalink
Merge pull request #88 from Central-MakeUs/dev
Browse files Browse the repository at this point in the history
[Refactor] 서버 api 수정 및 HealthCheckController 생성
  • Loading branch information
dainnida authored Feb 10, 2025
2 parents f64e2ad + 4ab1e16 commit ddd2a1f
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import reactor.core.publisher.Mono;

@RestController
@RequestMapping("/books")
@RequestMapping("/api/books")
@RequiredArgsConstructor
@Tag(name = "BookController", description = "도서 검색 관련 API")
public class BookController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import java.util.HashMap;

@RestController
@RequestMapping("/records/{recordId}/memos")
@RequestMapping("/api/records/{recordId}/memos")
@RequiredArgsConstructor
@Tag(name = "MemoController", description = "메모 관련 API")
public class MemoController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import java.util.HashMap;

@RestController
@RequestMapping("/records")
@RequestMapping("/api/records")
@RequiredArgsConstructor
@Tag(name = "RecordController", description = "도서 기록 관련 API")
public class RecordController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/timers")
@RequestMapping("/api/timers")
@RequiredArgsConstructor
@Tag(name = "TimerController", description = "타이머 관련 API")
public class TimerController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import java.util.List;

@RestController
@RequestMapping("/users")
@RequestMapping("/api/users")
@RequiredArgsConstructor
@Tag(name = "UserController", description = "유저 관련 API")
public class UserController {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.cmc.mercury.global.controller;

import com.cmc.mercury.global.response.SuccessResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.net.InetAddress;
import java.net.UnknownHostException;

@RestController
@RequestMapping("/api")
public class HealthCheckController {

@GetMapping("/health")
public SuccessResponse<String> healthCheck() {
return SuccessResponse.ok("Yeah! Healthy");
}
}

0 comments on commit ddd2a1f

Please sign in to comment.