From 5405d9615081bd13cbbf548116cc8838fd48d3a4 Mon Sep 17 00:00:00 2001 From: Leon Liang Date: Thu, 24 Oct 2019 22:42:46 -0400 Subject: [PATCH] created function to add topic --- functions/index.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/functions/index.js b/functions/index.js index 675b020..fb60497 100644 --- a/functions/index.js +++ b/functions/index.js @@ -44,11 +44,22 @@ app.get("/user", fbAuth, getAuthenticatedUser); /*------------------------------------------------------------------* * handlers/post.js * *------------------------------------------------------------------*/ -const { getallPostsforUser, putPost } = require("./handlers/post"); +const { getallPostsforUser, putPost +} = require("./handlers/post"); app.get("/getallPostsforUser", getallPostsforUser); // Adds one post to the database app.post("/putPost", fbAuth, putPost); +/*------------------------------------------------------------------* + * handlers/topic.js * + *------------------------------------------------------------------*/ +const { putTopic +} = require("./handlers/topic"); + +// add topic to database + +app.post("/putTopic", fbAuth, putTopic); + exports.api = functions.https.onRequest(app);