-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdmissionTypeDetailController.java
32 lines (25 loc) · 1.19 KB
/
AdmissionTypeDetailController.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package mju.iphak.maru_egg.admission.api;
import java.util.List;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import lombok.RequiredArgsConstructor;
import mju.iphak.maru_egg.admission.api.swagger.AdmissionTypeDetailControllerDocs;
import mju.iphak.maru_egg.admission.application.AdmissionTypeDetailService;
import mju.iphak.maru_egg.admission.domain.AdmissionType;
import mju.iphak.maru_egg.admission.dto.response.AdmissionTypeDetailResponse;
@RestController
@RequestMapping("/api/admissions")
@RequiredArgsConstructor
public class AdmissionTypeDetailController implements AdmissionTypeDetailControllerDocs {
private final AdmissionTypeDetailService admissionTypeDetailService;
@GetMapping("/details")
public List<AdmissionTypeDetailResponse> getAll() {
return admissionTypeDetailService.findAll();
}
@GetMapping("/details/{type}")
public List<AdmissionTypeDetailResponse> getAllByType(@PathVariable("type") AdmissionType type) {
return admissionTypeDetailService.findAllByAdmissionType(type);
}
}