List boost by users

This commit is contained in:
2024-12-28 22:14:30 +08:00
parent 1a5787d3c2
commit ebc3a6f09c
3 changed files with 50 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ func MapAPIs(app *fiber.App, baseURL string) {
{
boost := api.Group("/boosts").Name("Boosts API")
{
boost.Get("/", listBoostByUser)
boost.Get("/:id", getBoost)
boost.Post("/", sec.ValidatorMiddleware, createBoost)
boost.Put("/:id", sec.ValidatorMiddleware, updateBoost)
@@ -28,7 +29,7 @@ func MapAPIs(app *fiber.App, baseURL string) {
attachments := api.Get("/attachments").Name("Attachments API")
{
attachments.Get("/:attachmentId/boosts", listBoost)
attachments.Get("/:attachmentId/boosts", listBoostByAttachment)
attachments.Get("/", listAttachment)
attachments.Get("/:id/meta", getAttachmentMeta)