e57a2f23d6
Season 14+ have proper display assets
27 lines
708 B
Go
27 lines
708 B
Go
package handlers
|
|
|
|
import (
|
|
"github.com/goccy/go-json"
|
|
|
|
"github.com/ectrc/snow/aid"
|
|
"github.com/ectrc/snow/fortnite"
|
|
"github.com/ectrc/snow/person"
|
|
"github.com/ectrc/snow/storage"
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
func GetStorefrontCatalog(c *fiber.Ctx) error {
|
|
person := c.Locals("person").(*person.Person)
|
|
|
|
return c.Status(fiber.StatusOK).JSON(fortnite.StaticCatalog.GenerateFortniteCatalog(person))
|
|
}
|
|
|
|
func GetStorefrontKeychain(c *fiber.Ctx) error {
|
|
var keychain []string
|
|
err := json.Unmarshal(*storage.Asset("keychain.json"), &keychain)
|
|
if err != nil {
|
|
return c.Status(fiber.StatusInternalServerError).JSON(aid.JSON{"error":err.Error()})
|
|
}
|
|
|
|
return c.Status(fiber.StatusOK).JSON(keychain)
|
|
} |