Filtering just with topics

This commit is contained in:
shobhitm23 2019-11-08 18:08:28 -05:00
parent 903ea35662
commit 4958723a42

View File

@ -69,3 +69,13 @@ exports.getallPosts = (req, res) => {
exports.getFilteredPosts = (req, res) => {
admin.firestore().collection('posts').where('userHandle', '==', 'new user').where('microBlogTopics', '==')
};
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');
}