Merge pull request #61 from ClaytonWWilson/filteredPosts

Arrow-callback warning
This commit is contained in:
Shobhit Makhija 2019-10-28 01:34:43 -04:00 committed by GitHub
commit f602b8251f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,4 @@
/* eslint-disable prefer-arrow-callback */
/* eslint-disable promise/always-return */ /* eslint-disable promise/always-return */
const admin = require('firebase-admin'); const admin = require('firebase-admin');
exports.putPost = (req, res) => { exports.putPost = (req, res) => {
@ -41,3 +42,7 @@ exports.getallPostsforUser = (req, res) => {
return res.status(500).json({error: 'Failed to fetch all posts written by specific user.'}) return res.status(500).json({error: 'Failed to fetch all posts written by specific user.'})
}) })
}; };
exports.getFilteredPosts = (req, res) => {
admin.firestore().collection('posts').where('userHandle', '==', 'new user').where('microBlogTopics', '==')
};