Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/mission/umc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ out/
### VS Code ###
.vscode/

application.yml
application.yml
application-secret.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package com.example.umc.web.controller;

import com.example.umc.common.BaseResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;

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

@Value("${server.env}")
private String env;
@Value("${server.port}")
private String port;
@Value("${server.address}")
private String address;


@GetMapping
public BaseResponse<?> healthCheck(){
Map<String, String> responseData = new TreeMap<>();
responseData.put("env", env);
responseData.put("port", port);
responseData.put("address", address);

return BaseResponse.onSuccess(responseData);
}

@GetMapping("/env")
public BaseResponse<String> getEnv(){

return BaseResponse.onSuccess(env);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public BaseResponse<Page<ReviewResponseDto>> getReview(@PathVariable Long member
return BaseResponse.onSuccess(reviewService.getReviewsByMemberId(memberId, pageable));
}


@GetMapping("/get/missions/{memberId}")
public BaseResponse<Page<MissionResponseDto>> getMissionsByMemberId(@PathVariable Long memberId, Pageable pageable){
return BaseResponse.onSuccess(memberService.getMissionsByMemberId(memberId, pageable));
Expand Down