feat: new endpoint to get all instances within a ji
This commit is contained in:
parent
0aa72576ce
commit
2eab309cb2
@ -53,8 +53,7 @@ public class InstanceEndpoints {
|
|||||||
@RolesAllowed("ROOT")
|
@RolesAllowed("ROOT")
|
||||||
@Path("/{id}/all-instances")
|
@Path("/{id}/all-instances")
|
||||||
public Response getAllInstancesJi(@PathParam("id") Long jiId) {
|
public Response getAllInstancesJi(@PathParam("id") Long jiId) {
|
||||||
// TODO : a modif, la c est juste all instances
|
return Response.ok(jiService.getAllInstancesJi(jiId)).build();
|
||||||
return Response.ok(instanceService.getAllInstances()).build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
|
|||||||
@ -48,6 +48,7 @@ public class JiService {
|
|||||||
|
|
||||||
public Ji getJi(Long id) { return jiRepository.findById(id); }
|
public Ji getJi(Long id) { return jiRepository.findById(id); }
|
||||||
public Long getJiSiteId(Long id) { return jiRepository.findById(id).site.id; }
|
public Long getJiSiteId(Long id) { return jiRepository.findById(id).site.id; }
|
||||||
|
public List<Instance> getAllInstancesJi(Long jiId) { return jiRepository.findById(jiId).instances; }
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit 0a7e3fcc4479ec189128cb852b69f9b353e8fcd4
|
Subproject commit ddcb0920c54cbbc3c896fb735f97a9bc5f7e28f5
|
||||||
Loading…
x
Reference in New Issue
Block a user