mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2026-03-10 21:25:04 +00:00
added function to delete topic
This commit is contained in:
@@ -55,7 +55,10 @@ app.post("/putPost", fbAuth, putPost);
|
||||
/*------------------------------------------------------------------*
|
||||
* handlers/topic.js *
|
||||
*------------------------------------------------------------------*/
|
||||
const { putTopic, getAllTopics
|
||||
const {
|
||||
putTopic,
|
||||
getAllTopics,
|
||||
deleteTopic
|
||||
} = require("./handlers/topic");
|
||||
|
||||
// add topic to database
|
||||
@@ -64,4 +67,7 @@ app.post("/putTopic", fbAuth, putTopic);
|
||||
// get all topics from database
|
||||
app.get("/getAllTopics", fbAuth, getAllTopics);
|
||||
|
||||
// delete a specific topic
|
||||
app.delete("/deleteTopic/:topicId", fbAuth, deleteTopic);
|
||||
|
||||
exports.api = functions.https.onRequest(app);
|
||||
|
||||
Reference in New Issue
Block a user