Skip to content

Commit

Permalink
CleanUp and reformatting Code.
Browse files Browse the repository at this point in the history
  • Loading branch information
giuseppebueti committed Feb 13, 2016
1 parent 04d9bbb commit 81f4984
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public Movie movieByImdbId(@QueryParam("imdbId") String imdbId) {
return inventory.get(imdbId);
} else
return null;

}

@POST
Expand All @@ -41,7 +40,6 @@ public Response addMovie(Movie movie) {
}

inventory.put(movie.getImdbId(), movie);

return Response.status(Response.Status.CREATED).build();
}

Expand All @@ -55,9 +53,9 @@ public Response updateMovie(Movie movie) {
if (null == inventory.get(movie.getImdbId())) {
return Response.status(Response.Status.NOT_MODIFIED).entity("Movie is not in the database.\nUnable to Update").build();
}

inventory.put(movie.getImdbId(), movie);
return Response.status(Response.Status.OK).build();

}

@DELETE
Expand All @@ -80,7 +78,6 @@ public Response deleteMovie(@QueryParam("imdbId") String imdbId) {
public List<Movie> listMovies() {

return inventory.values().stream().collect(Collectors.toCollection(ArrayList::new));

}

}

0 comments on commit 81f4984

Please sign in to comment.