public class Collections extends Controller {
//TODO index
public static Result show(Long id) throws IOException {
User user = new User();
user = user.getUserFromSession(session());
RestResponse response = Collection.findByID(id, user.token());
if(response.httpResponse.getStatusLine().getStatusCode() == 200) {
return ok(views.html.collection.detail.render(user, (Collection)response.modelObject, "Single Collection", response.jsonString, response.endpoint));
} else {
return internalServerError();
}