Be able to lookup sticker via thier pack prefix + alias

This commit is contained in:
2024-09-15 18:39:09 +08:00
parent af1b45bd92
commit 525a103a76
3 changed files with 24 additions and 0 deletions

View File

@@ -12,6 +12,15 @@ import (
"github.com/gofiber/fiber/v2"
)
func lookupSticker(c *fiber.Ctx) error {
alias := c.Params("alias")
if sticker, err := services.GetStickerWithAlias(alias); err != nil {
return fiber.NewError(fiber.StatusNotFound, err.Error())
} else {
return c.JSON(sticker)
}
}
func listStickers(c *fiber.Ctx) error {
take := c.QueryInt("take", 0)
offset := c.QueryInt("offset", 0)