2023-11-03 23:48:50 +00:00
|
|
|
package handlers
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/ectrc/snow/aid"
|
2024-02-04 20:03:53 +00:00
|
|
|
p "github.com/ectrc/snow/person"
|
2023-11-03 23:48:50 +00:00
|
|
|
"github.com/gofiber/fiber/v2"
|
|
|
|
)
|
|
|
|
|
2024-01-28 22:04:40 +00:00
|
|
|
func RedirectSocket(c *fiber.Ctx) error {
|
|
|
|
return c.Redirect("/socket")
|
|
|
|
}
|
|
|
|
|
2023-11-03 23:48:50 +00:00
|
|
|
func AnyNoContent(c *fiber.Ctx) error {
|
2024-02-04 20:03:53 +00:00
|
|
|
return c.SendStatus(204)
|
2023-11-03 23:48:50 +00:00
|
|
|
}
|
|
|
|
|
2023-11-05 22:08:53 +00:00
|
|
|
func PostGamePlatform(c *fiber.Ctx) error {
|
2024-02-04 20:03:53 +00:00
|
|
|
return c.Status(200).SendString("true")
|
2023-11-03 23:48:50 +00:00
|
|
|
}
|
|
|
|
|
2023-11-05 22:08:53 +00:00
|
|
|
func GetGameEnabledFeatures(c *fiber.Ctx) error {
|
2024-02-04 20:03:53 +00:00
|
|
|
return c.Status(200).JSON([]string{})
|
2023-11-03 23:48:50 +00:00
|
|
|
}
|
|
|
|
|
2023-11-05 22:08:53 +00:00
|
|
|
func PostGameAccess(c *fiber.Ctx) error {
|
2024-02-04 20:03:53 +00:00
|
|
|
return c.Status(200).SendString("true")
|
2023-11-03 23:48:50 +00:00
|
|
|
}
|
|
|
|
|
2023-11-05 22:08:53 +00:00
|
|
|
func GetFortniteReceipts(c *fiber.Ctx) error {
|
2024-02-04 20:03:53 +00:00
|
|
|
return c.Status(200).JSON([]string{})
|
2023-11-03 23:48:50 +00:00
|
|
|
}
|
|
|
|
|
2023-11-05 22:08:53 +00:00
|
|
|
func GetMatchmakingSession(c *fiber.Ctx) error {
|
2024-02-04 20:03:53 +00:00
|
|
|
return c.Status(200).Send([]byte{})
|
2023-11-03 23:48:50 +00:00
|
|
|
}
|
|
|
|
|
2023-11-05 22:08:53 +00:00
|
|
|
func GetFortniteVersion(c *fiber.Ctx) error {
|
2024-02-04 20:03:53 +00:00
|
|
|
return c.Status(200).JSON(aid.JSON{
|
2023-11-03 23:48:50 +00:00
|
|
|
"type": "NO_UPDATE",
|
|
|
|
})
|
2023-11-05 01:58:00 +00:00
|
|
|
}
|
|
|
|
|
2023-11-20 21:20:26 +00:00
|
|
|
func GetWaitingRoomStatus(c *fiber.Ctx) error {
|
2024-02-04 20:03:53 +00:00
|
|
|
return c.SendStatus(204)
|
|
|
|
}
|
|
|
|
|
|
|
|
func GetAffiliate(c *fiber.Ctx) error {
|
|
|
|
slugger := p.FindByDisplay(c.Params("slug"))
|
|
|
|
if slugger == nil {
|
|
|
|
return c.Status(400).JSON(aid.ErrorBadRequest("Invalid affiliate slug"))
|
|
|
|
}
|
|
|
|
|
|
|
|
return c.Status(200).JSON(aid.JSON{
|
|
|
|
"id": slugger.ID,
|
|
|
|
"displayName": slugger.DisplayName,
|
|
|
|
"slug": slugger.DisplayName,
|
|
|
|
"status": "ACTIVE",
|
|
|
|
"verified": false,
|
|
|
|
})
|
2023-11-20 21:20:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func GetRegion(c *fiber.Ctx) error {
|
2024-02-04 20:03:53 +00:00
|
|
|
return c.Status(200).JSON(aid.JSON{
|
2023-11-20 21:20:26 +00:00
|
|
|
"continent": aid.JSON{
|
|
|
|
"code": "EU",
|
|
|
|
},
|
|
|
|
"country": aid.JSON{
|
|
|
|
"iso_code": "GB",
|
|
|
|
},
|
|
|
|
"subdivisions": []aid.JSON{},
|
|
|
|
})
|
2023-11-03 23:48:50 +00:00
|
|
|
}
|