From dbe199d46951595b13f795e583fa011bc556c4ef Mon Sep 17 00:00:00 2001
From: arshiam2 <arshiam2@illinois.edu>
Date: Sat, 1 Dec 2018 22:02:49 -0600
Subject: [PATCH] update

---
 cli/src/commands/get-stream.js | 14 +++++++-------
 sfds/index.js                  |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/cli/src/commands/get-stream.js b/cli/src/commands/get-stream.js
index 6b9b7ee..2bd1aea 100644
--- a/cli/src/commands/get-stream.js
+++ b/cli/src/commands/get-stream.js
@@ -12,7 +12,7 @@ const fetch = require("node-fetch");
 const handleErrors = require("../utils/handleErrors");
 const getMaster = require("../utils/getMaster");
 
-module.exports.command = "put-stream";
+module.exports.command = "get-stream";
 module.exports.describe = "Writes localfilename to the SDFS as sdfsfilename.";
 module.exports.builder = (yargs: any) => yargs;
 
@@ -20,23 +20,23 @@ module.exports.builder = (yargs: any) => yargs;
 
 module.exports.handler = handleErrors(async (argv: {}) => {
   const master = await getMaster();
-  getCSVdata();
+//   getCSVdata();
 
   setInterval(function sync() {
     // if (queue.length > 0) {
     //   const body = queue.pop();
       var target = "http://"+ master + ":3000/sink/";
-    //   console.log(target)
+      console.log(target)
     //   console.log(JSON.stringify(body).state)
       fetch(target)
-        .then(res => console.log(res.text()))
-        // .then(json => {
+        .then(res => (res.text()))
+        .then(json => {
         // //   if (json.action !== "END") {
         // //     queue.push(json);
         // //   } else {
-        //     // console.log(json);
+            console.log(json);
         // //   }
-        // });
+        });
     // }
   
   }, 500);
diff --git a/sfds/index.js b/sfds/index.js
index a0e4273..b0c3d67 100644
--- a/sfds/index.js
+++ b/sfds/index.js
@@ -408,7 +408,7 @@ app.post("/spout", function(req, res) {
   res.send("got it");
 });
 
-app.post("/sink", function(req, res) {
+app.get("/sink", function(req, res) {
   // console.log("bolt state: " +req.body.state)
   res.send("IM A SINK");
 });
-- 
GitLab