mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-16 02:08:47 +00:00
created function to add topic
This commit is contained in:
parent
de38339cad
commit
5405d96150
@ -44,11 +44,22 @@ app.get("/user", fbAuth, getAuthenticatedUser);
|
|||||||
/*------------------------------------------------------------------*
|
/*------------------------------------------------------------------*
|
||||||
* handlers/post.js *
|
* handlers/post.js *
|
||||||
*------------------------------------------------------------------*/
|
*------------------------------------------------------------------*/
|
||||||
const { getallPostsforUser, putPost } = require("./handlers/post");
|
const { getallPostsforUser, putPost
|
||||||
|
} = require("./handlers/post");
|
||||||
|
|
||||||
app.get("/getallPostsforUser", getallPostsforUser);
|
app.get("/getallPostsforUser", getallPostsforUser);
|
||||||
|
|
||||||
// Adds one post to the database
|
// Adds one post to the database
|
||||||
app.post("/putPost", fbAuth, putPost);
|
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);
|
exports.api = functions.https.onRequest(app);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user