Commit 4b82b017 by Tuomas Riihimäki

Fix imports

1 parent 7c62cc6c
...@@ -34,7 +34,6 @@ import fi.codecrew.moya.utilities.jpa.ModelInterface; ...@@ -34,7 +34,6 @@ import fi.codecrew.moya.utilities.jpa.ModelInterface;
public class GenericEntity extends EntityEquals implements ModelInterface, EntityMeta { public class GenericEntity extends EntityEquals implements ModelInterface, EntityMeta {
private static final long serialVersionUID = -9041737052951021560L; private static final long serialVersionUID = -9041737052951021560L;
public static final String ID_COLUMN = "id";
@Id @Id
@Column(name = ID_COLUMN, nullable = false, updatable = false) @Column(name = ID_COLUMN, nullable = false, updatable = false)
......
...@@ -96,28 +96,25 @@ public class PlacemapRestViewV1 { ...@@ -96,28 +96,25 @@ public class PlacemapRestViewV1 {
} }
@GET @GET
@Path("{id}/hilightedPlaces/{userid}") @Path("{id}/hilightedPlaces/{userid}")
public Response getHilightedPlaces(@PathParam("id") Integer mapId, @PathParam("userid") Integer userId) public Response getHilightedPlaces(@PathParam("id") Integer mapId, @PathParam("userid") Integer userId)
{ {
EventMap map = placebean.findMap(mapId); EventMap map = placebean.findMap(mapId);
if(!permbean.hasPermission(UserPermission.VIEW_ALL)) { if (!permbean.hasPermission(UserPermission.VIEW_ALL)) {
return Response.status(Response.Status.FORBIDDEN).entity("Try to login first!").build(); return Response.status(Response.Status.FORBIDDEN).entity("Try to login first!").build();
} }
EventUser user = userbean.findByUserId(userId,false); EventUser user = userbean.findByUserId(userId, false);
if (user == null) { if (user == null) {
return Response.status(Response.Status.BAD_REQUEST).entity("No User found for id: "+userId).build(); return Response.status(Response.Status.BAD_REQUEST).entity("No User found for id: " + userId).build();
} }
return Response.ok(PojoUtils.parseSimplePlaces(map.getPlaces(), user, permbean.hasPermission(UserPermission.VIEW_ALL), true)).build(); return Response.ok(PojoUtils.parseSimplePlaces(map.getPlaces(), user, permbean.hasPermission(UserPermission.VIEW_ALL), true)).build();
} }
@GET @GET
@Path("{id}/places") @Path("{id}/places")
public SimplePlacelistRoot getPlaces(@PathParam("id") Integer mapId) public SimplePlacelistRoot getPlaces(@PathParam("id") Integer mapId)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!