From cbfe9207ad7c9bba96b39c550d250d12097fd06f Mon Sep 17 00:00:00 2001
From: Roberto Sánchez <roberto.sanchez@curisit.net>
Date: Thu, 23 Jan 2014 19:21:10 +0000
Subject: [PATCH] #395 feature - Implemented license section at 75%

---
 securis/src/main/java/net/curisit/securis/services/PackResource.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/securis/src/main/java/net/curisit/securis/services/PackResource.java b/securis/src/main/java/net/curisit/securis/services/PackResource.java
index 76adfa1..f22649e 100644
--- a/securis/src/main/java/net/curisit/securis/services/PackResource.java
+++ b/securis/src/main/java/net/curisit/securis/services/PackResource.java
@@ -101,7 +101,7 @@
 	@Securable
 	@Produces(
 		{ MediaType.APPLICATION_JSON })
-	public Response get(@PathParam("packId") String packId, @Context BasicSecurityContext bsc) {
+	public Response get(@PathParam("packId") Integer packId, @Context BasicSecurityContext bsc) {
 		log.info("Getting pack data for id: {}: ", packId);
 		if (packId == null || packId.equals("")) {
 			log.error("Pack ID is mandatory");
@@ -109,7 +109,7 @@
 		}
 
 		EntityManager em = emProvider.get();
-		Pack pack = em.find(Pack.class, Integer.parseInt(packId));
+		Pack pack = em.find(Pack.class, packId);
 		if (pack == null) {
 			log.error("Pack with id {} not found in DB", packId);
 			return Response.status(Status.NOT_FOUND).build();
@@ -171,10 +171,10 @@
 	@Consumes(MediaType.APPLICATION_JSON)
 	@Produces(
 		{ MediaType.APPLICATION_JSON })
-	public Response modify(Pack pack, @PathParam("packId") String packId) {
+	public Response modify(Pack pack, @PathParam("packId") Integer packId) {
 		log.info("Modifying pack with id: {}", packId);
 		EntityManager em = emProvider.get();
-		Pack currentPack = em.find(Pack.class, Integer.parseInt(packId));
+		Pack currentPack = em.find(Pack.class, packId);
 
 		Organization org = null;
 		if (pack.getOrgId() != null) {

--
Gitblit v1.3.2