Able to search sticker with alias

This commit is contained in:
2024-09-16 20:44:40 +08:00
parent 778d09d74a
commit bf5c718780
3 changed files with 24 additions and 0 deletions

View File

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