| .. | .. |
|---|
| 101 | 101 | @Securable |
|---|
| 102 | 102 | @Produces( |
|---|
| 103 | 103 | { MediaType.APPLICATION_JSON }) |
|---|
| 104 | | - public Response get(@PathParam("packId") String packId, @Context BasicSecurityContext bsc) { |
|---|
| 104 | + public Response get(@PathParam("packId") Integer packId, @Context BasicSecurityContext bsc) { |
|---|
| 105 | 105 | log.info("Getting pack data for id: {}: ", packId); |
|---|
| 106 | 106 | if (packId == null || packId.equals("")) { |
|---|
| 107 | 107 | log.error("Pack ID is mandatory"); |
|---|
| .. | .. |
|---|
| 109 | 109 | } |
|---|
| 110 | 110 | |
|---|
| 111 | 111 | EntityManager em = emProvider.get(); |
|---|
| 112 | | - Pack pack = em.find(Pack.class, Integer.parseInt(packId)); |
|---|
| 112 | + Pack pack = em.find(Pack.class, packId); |
|---|
| 113 | 113 | if (pack == null) { |
|---|
| 114 | 114 | log.error("Pack with id {} not found in DB", packId); |
|---|
| 115 | 115 | return Response.status(Status.NOT_FOUND).build(); |
|---|
| .. | .. |
|---|
| 171 | 171 | @Consumes(MediaType.APPLICATION_JSON) |
|---|
| 172 | 172 | @Produces( |
|---|
| 173 | 173 | { MediaType.APPLICATION_JSON }) |
|---|
| 174 | | - public Response modify(Pack pack, @PathParam("packId") String packId) { |
|---|
| 174 | + public Response modify(Pack pack, @PathParam("packId") Integer packId) { |
|---|
| 175 | 175 | log.info("Modifying pack with id: {}", packId); |
|---|
| 176 | 176 | EntityManager em = emProvider.get(); |
|---|
| 177 | | - Pack currentPack = em.find(Pack.class, Integer.parseInt(packId)); |
|---|
| 177 | + Pack currentPack = em.find(Pack.class, packId); |
|---|
| 178 | 178 | |
|---|
| 179 | 179 | Organization org = null; |
|---|
| 180 | 180 | if (pack.getOrgId() != null) { |
|---|