diff --git a/src/main/java/ca/utoronto/utm/mcs/ReqHandler.java b/src/main/java/ca/utoronto/utm/mcs/ReqHandler.java index 4a77611..d7971b5 100644 --- a/src/main/java/ca/utoronto/utm/mcs/ReqHandler.java +++ b/src/main/java/ca/utoronto/utm/mcs/ReqHandler.java @@ -68,7 +68,7 @@ public void addActor(HttpExchange r) throws IOException, JSONException { String name, actorId; - if (deserialized.length() == 2 && deserialized.has("name") && deserialized.has("actorId")) { + if (deserialized.has("name") && deserialized.has("actorId")) { name = deserialized.getString("name"); actorId = deserialized.getString("actorId"); } else { @@ -100,7 +100,7 @@ public void addMovie(HttpExchange r) throws IOException, JSONException { String name, movieId; - if (deserialized.length() == 2 && deserialized.has("name") && deserialized.has("movieId")) { + if (deserialized.has("name") && deserialized.has("movieId")) { name = deserialized.getString("name"); movieId = deserialized.getString("movieId"); } else { @@ -132,7 +132,7 @@ public void addRelationship(HttpExchange r) throws IOException, JSONException { String actorId, movieId; - if (deserialized.length() == 2 && deserialized.has("actorId") && deserialized.has("movieId")) { + if (deserialized.has("actorId") && deserialized.has("movieId")) { actorId = deserialized.getString("actorId"); movieId = deserialized.getString("movieId"); } else {