Skip to content

Commit

Permalink
put-requests: request can have extra parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyZ1435 committed Oct 27, 2022
1 parent b008b06 commit 7ee45e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/ca/utoronto/utm/mcs/ReqHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 7ee45e8

Please sign in to comment.