mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2026-03-10 13:15:05 +00:00
Merge pull request #111 from ClaytonWWilson/filter_timeli
fixed up add subscription method
This commit is contained in:
@@ -1178,8 +1178,12 @@ exports.addSubscription = (req, res) => {
|
||||
let userRef = db.doc(`/users/${req.userData.handle}`);
|
||||
userRef.get().then(doc => {
|
||||
new_following = doc.data().following;
|
||||
const struct = {
|
||||
handle: req.body.following,
|
||||
topics: ["Admin"]
|
||||
}
|
||||
new_following
|
||||
? new_following.push(req.body.following)
|
||||
? new_following.push(struct)
|
||||
: (new_following = req.body.following);
|
||||
|
||||
// add stuff
|
||||
|
||||
Reference in New Issue
Block a user