Commit d75cdfb9 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Modified /ws/join endpoint in order to return the remaining user id

parent a6f15f42
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ Flight::route('POST ' . $WS_PREFIX . '/user', function() {
});

/**
 * Perform a join.
 * Performs a join.
 */
Flight::route('POST ' . $WS_PREFIX . '/join', function() {

@@ -111,7 +111,8 @@ Flight::route('POST ' . $WS_PREFIX . '/join', function() {

    $userHandler->joinUsers($postData['user1'], $postData['user2']);

    echo "Success";
    // if the join has success, returns the remaining user id
    echo $postData['user1'];
});

Flight::route('GET ' . $WS_PREFIX . '/test', function() {