[INFRA-421] | Anoop | Add api to list all manifests
This commit is contained in:
@@ -55,10 +55,15 @@ public class ManifestController {
|
||||
}
|
||||
|
||||
@GetMapping("/list/{environment}")
|
||||
List<ManifestName> fetchListByEnvironment(@PathVariable String environment) throws VaultException, RestException {
|
||||
List<ManifestName> fetchListByEnvironment(@PathVariable String environment) {
|
||||
return manifestService.fetchListByEnvironment(environment);
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
List<ManifestName> fetchCompleteList() {
|
||||
return manifestService.fetchCompleteList();
|
||||
}
|
||||
|
||||
@GetMapping("/{id}/copy")
|
||||
public Manifest copyManifest(@PathVariable Long id) {
|
||||
return manifestService.copyManifest(id);
|
||||
|
||||
@@ -5,4 +5,6 @@ public interface ManifestName {
|
||||
Long getId();
|
||||
|
||||
String getName();
|
||||
|
||||
String getEnvironment();
|
||||
}
|
||||
|
||||
@@ -12,4 +12,6 @@ public interface ManifestRepository extends JpaRepository<Manifest, Long> {
|
||||
Optional<Manifest> findByNameAndEnvironment(String name, String environment);
|
||||
|
||||
List<ManifestName> findIdAndNameByEnvironment(String environment);
|
||||
|
||||
List<ManifestName> findIdAndNameAndEnvironmentBy();
|
||||
}
|
||||
|
||||
@@ -183,4 +183,8 @@ public class ManifestService {
|
||||
public List<ManifestName> fetchListByEnvironment(String environment) {
|
||||
return manifestRepository.findIdAndNameByEnvironment(environment);
|
||||
}
|
||||
|
||||
public List<ManifestName> fetchCompleteList() {
|
||||
return manifestRepository.findIdAndNameAndEnvironmentBy();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user