From 20f73d83c16372d6e30d11770d92dd540dcc8ca5 Mon Sep 17 00:00:00 2001
From: Sonia Zorba <zorba@oats.inaf.it>
Date: Wed, 2 Aug 2017 12:48:06 +0200
Subject: [PATCH] Added REST WS endpoint for force the join operations

---
 include/rest-web-service.php | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/rest-web-service.php b/include/rest-web-service.php
index 64d5880..a3d507d 100644
--- a/include/rest-web-service.php
+++ b/include/rest-web-service.php
@@ -82,6 +82,16 @@ Flight::route('POST ' . $WS_PREFIX . '/user', function() {
     echo json_encode($user);
 });
 
+Flight::route('POST ' . $WS_PREFIX . '/join', function() {
+
+    global $userHandler;
+    $postData = Flight::request()->data;
+
+    $userHandler->joinUsers($postData['user1'], $postData['user2']);
+
+    echo "Success";
+});
+
 Flight::route('GET ' . $WS_PREFIX . '/test', function() {
     
 });
-- 
GitLab