From aa6d9b33f70c9baccac98ab41c72d2bd787eac83 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Thu, 2 Dec 2021 00:30:45 +0100
Subject: [PATCH] Remove tourneyPath: doesn't make sense without tournament
 website

---
 server/config/parameters.js.dist | 3 ---
 server/models/User.js            | 2 --
 server/routes/users.js           | 3 ---
 3 files changed, 8 deletions(-)

diff --git a/server/config/parameters.js.dist b/server/config/parameters.js.dist
index b7abc139..1cf44752 100644
--- a/server/config/parameters.js.dist
+++ b/server/config/parameters.js.dist
@@ -21,9 +21,6 @@ module.exports = {
     expire: 30*60*1000, //30 minutes in milliseconds
   },
 
-  // Path to tournament repository (to synchronize DBs)
-  tourneyPath: "/path/to/folder",
-
   // Email settings
   mail: {
     host: "mail_host_address",
diff --git a/server/models/User.js b/server/models/User.js
index 655012d8..cc104ab0 100644
--- a/server/models/User.js
+++ b/server/models/User.js
@@ -177,8 +177,6 @@ const UserModel = {
             "DELETE FROM Users " +
             "WHERE id IN (" + remArg + ")"
           );
-          // Update tournament DB:
-          exec(params.tourneyPath + "/dbsync/delete_users.py " + remArg);
         }
       });
     });
diff --git a/server/routes/users.js b/server/routes/users.js
index b14defbc..94711134 100644
--- a/server/routes/users.js
+++ b/server/routes/users.js
@@ -50,8 +50,6 @@ router.post('/register', access.unlogged, access.ajax, (req,res) => {
           email: email
         };
         setAndSendLoginToken("Welcome to " + params.siteURL, user);
-        // Update tournament DB (TODO: if error, log it)
-        exec(params.tourneyPath + "/dbsync/insert_user.py " + ret.id);
         res.json({});
       }
     });
@@ -105,7 +103,6 @@ router.put('/update', access.logged, access.ajax, (req,res) => {
       notify: !!req.body.notify,
     };
     UserModel.updateSettings(user);
-    exec(params.tourneyPath + "/dbsync/update_user.py " + ret.id);
     res.json({});
   }
 });
-- 
2.44.0