Basic logic

This commit is contained in:
shobhitm23 2019-11-12 14:12:18 -05:00
parent 4958723a42
commit 5ad28dc254

View File

@ -75,7 +75,10 @@ exports.getFilteredPostsOnTopics = (req, res) => {
// get topics that user follows
// make a set storing all topics
// for each post, make a set of topics and if A and B != 0, you can display post
var topics = admin.firestore().collection('users').where('userHandle', '==', req.userHandle)
var query = admin.firestore().collection('posts');
var queryTopics = admin.firestore().collection('users').where('userHandle', '==', req.userHandle)
var topics = new Set();
topics.add(queryTopics.get().microBlogTopics)
var queryPosts = admin.firestore().collection('posts');
}