| .. | .. |
|---|
| 89 | 89 | } |
|---|
| 90 | 90 | |
|---|
| 91 | 91 | EntityManager em = emProvider.get(); |
|---|
| 92 | | - User lt = em.find(User.class, Integer.parseInt(uid)); |
|---|
| 92 | + User lt = em.find(User.class, uid); |
|---|
| 93 | 93 | if (lt == null) { |
|---|
| 94 | 94 | log.error("User with id {} not found in DB", uid); |
|---|
| 95 | 95 | return Response.status(Status.NOT_FOUND).build(); |
|---|
| .. | .. |
|---|
| 187 | 187 | public Response delete(@PathParam("uid") String uid, @Context HttpServletRequest request) { |
|---|
| 188 | 188 | log.info("Deleting app with id: {}", uid); |
|---|
| 189 | 189 | EntityManager em = emProvider.get(); |
|---|
| 190 | | - User app = em.find(User.class, Integer.parseInt(uid)); |
|---|
| 190 | + User app = em.find(User.class, uid); |
|---|
| 191 | 191 | if (app == null) { |
|---|
| 192 | 192 | log.error("User with id {} can not be deleted, It was not found in DB", uid); |
|---|
| 193 | 193 | return Response.status(Status.NOT_FOUND).build(); |
|---|