Polls

This commit is contained in:
2025-02-12 21:26:04 +08:00
parent 1d92b8945e
commit 0904f91b01
8 changed files with 290 additions and 0 deletions

View File

@@ -64,6 +64,15 @@ func MapAPIs(app *fiber.App, baseURL string) {
posts.Get("/:postId/replies/featured", listPostFeaturedReply)
}
polls := api.Group("/polls").Name("Polls API")
{
polls.Get("/:pollId", getPoll)
polls.Post("/", createPoll)
polls.Put("/:pollId", updatePoll)
polls.Delete("/:pollId", deletePoll)
polls.Post("/:pollId/answer", answerPoll)
}
subscriptions := api.Group("/subscriptions").Name("Subscriptions API")
{
subscriptions.Get("/users/:userId", getSubscriptionOnUser)