Merge pull request #19 from ClaytonWWilson/user-line

added entering topics field and database call for adding topics when …
This commit is contained in:
asankaran35
2019-10-01 19:16:02 -04:00
committed by GitHub
4 changed files with 29 additions and 9 deletions

View File

@@ -11,6 +11,7 @@ exports.putPost = (req, res) => {
createdAt: new Date().toISOString(),
likeCount: 0,
commentCount: 0,
microBlogTopics: req.body.microBlogTopics
};

View File

@@ -43,7 +43,8 @@ const {putPost, getallPostsforUser} = require('./handlers/post');
app.get('/getallPostsforUser', getallPostsforUser);
// Adds one post to the database
app.post('/putPost', fbAuth, putPost);
app.post('/putPost', firebaseAuth, putPost);
exports.api = functions.https.onRequest(app);