From 57126efe408e7ee4cae8b9d1535587a9c949ebc6 Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Fri, 23 Dec 2022 09:10:09 -0500 Subject: [PATCH] removing Twitter client --- backend/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/index.js b/backend/index.js index ac31a6b..80c0f0e 100644 --- a/backend/index.js +++ b/backend/index.js @@ -52,6 +52,9 @@ io.on('connection', function (socket) { }); +// This section of code enable a Twitter client to tweet out messages when a new call comes in + +/* const client = new Twitter({ subdomain: "api", // "api" is the default (change for other subdomains) version: "1.1", // version "1.1" is the default (change for other subdomains) @@ -67,6 +70,7 @@ client console.log("Connected to Twitter"); }) .catch(console.error); +*/ function getRole(req) { if (req.params.shortName && req.user) { @@ -174,6 +178,10 @@ app.post('/:shortName/star/:id', calls.add_star); /*------ UPLOADS ---------- upload.single('call'), uploads.upload,*/ app.post('/:shortName/upload', upload.single('call'), uploads.upload, async function (req, res) { notify_clients(req.call); + + // This section is for sending out tweets when new calls come in + + /* if ((req.call.shortName == "dcfd") && (req.call.talkgroupNum == 101)) { var call_time = new Date(req.call.time); var call_link = "https://openmhz.com/system/dcfd?call-id=" + req.call._id + "&time=" + call_time.getTime(); @@ -184,7 +192,7 @@ app.post('/:shortName/upload', upload.single('call'), uploads.upload, async func status: status, }); //console.log("Tweet Response: " + response); - } + }*/ }); /*------ SYSTEMS ----------*/