Fixed conflicts with Sprint 2 checkpoint and the most up-to-date version

This commit is contained in:
Aaron Sun
2019-11-17 10:32:59 -05:00
parent c6022dbc38
commit 6184a22607
9 changed files with 310 additions and 632 deletions

View File

@@ -1,4 +1,3 @@
/* eslint-disable prefer-arrow-callback */
/* eslint-disable promise/always-return */
const admin = require('firebase-admin');
@@ -17,7 +16,6 @@ exports.putPost = (req, res) => {
admin.firestore().collection('posts').add(newPost)
.then((doc) => {
doc.update({postId: doc.id})
const resPost = newPost;
resPost.postId = doc.id;
return res.status(200).json(resPost);
@@ -65,7 +63,3 @@ exports.getallPosts = (req, res) => {
res.status(500).send("Failed to retrieve posts from database.", err);
});
};
exports.getFilteredPosts = (req, res) => {
admin.firestore().collection('posts').where('userHandle', '==', 'new user').where('microBlogTopics', '==')
};