added UI for follow and unfollow other user

This commit is contained in:
Leon Liang
2019-11-19 19:03:28 -05:00
parent 42c53fdbc4
commit 2de3da928a
3 changed files with 50 additions and 28 deletions

View File

@@ -450,6 +450,7 @@ exports.addSubscription = (req, res) => {
.catch(err => {
return res.status(500).json({ err });
});
return res.status(500).json({ error: "shouldn't execute" });
});
};
@@ -489,5 +490,6 @@ exports.removeSub = (req, res) => {
.catch(err => {
return res.status(500).json({ err });
});
return res.status(500).json({ error: "shouldn't execute" });
});
};

View File

@@ -65,7 +65,7 @@ app.get("/getSubs", fbAuth, getSubs);
app.post("/addSubscription", fbAuth, addSubscription);
// remove one subscription
app.delete("/removeSub", fbAuth, removeSub);
app.post("/removeSub", fbAuth, removeSub);
/*------------------------------------------------------------------*
* handlers/post.js *