2023-11-03 23:48:50 +00:00
package handlers
import (
2023-11-20 21:20:26 +00:00
"strconv"
2023-11-03 23:48:50 +00:00
"github.com/ectrc/snow/aid"
"github.com/gofiber/fiber/v2"
)
func AnyNoContent ( c * fiber . Ctx ) error {
return c . SendStatus ( fiber . StatusNoContent )
}
2023-11-05 22:08:53 +00:00
func PostGamePlatform ( c * fiber . Ctx ) error {
2023-11-03 23:48:50 +00:00
return c . Status ( fiber . StatusOK ) . SendString ( "true" )
}
2023-11-05 22:08:53 +00:00
func GetGameEnabledFeatures ( c * fiber . Ctx ) error {
2023-11-03 23:48:50 +00:00
return c . Status ( fiber . StatusOK ) . JSON ( [ ] string { } )
}
2023-11-05 22:08:53 +00:00
func PostGameAccess ( c * fiber . Ctx ) error {
2023-11-03 23:48:50 +00:00
return c . Status ( fiber . StatusOK ) . SendString ( "true" )
}
2023-11-05 22:08:53 +00:00
func GetFortniteReceipts ( c * fiber . Ctx ) error {
2023-11-03 23:48:50 +00:00
return c . Status ( fiber . StatusOK ) . JSON ( [ ] string { } )
}
2023-11-05 22:08:53 +00:00
func GetMatchmakingSession ( c * fiber . Ctx ) error {
2023-11-20 21:20:26 +00:00
return c . Status ( fiber . StatusOK ) . Send ( [ ] byte { } )
2023-11-03 23:48:50 +00:00
}
2023-11-05 22:08:53 +00:00
func GetFortniteVersion ( c * fiber . Ctx ) error {
2023-11-03 23:48:50 +00:00
return c . Status ( fiber . StatusOK ) . JSON ( aid . JSON {
"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 {
return c . SendStatus ( fiber . StatusNoContent )
}
func GetRegion ( c * fiber . Ctx ) error {
return c . Status ( fiber . StatusOK ) . JSON ( aid . JSON {
"continent" : aid . JSON {
"code" : "EU" ,
} ,
"country" : aid . JSON {
"iso_code" : "GB" ,
} ,
"subdivisions" : [ ] aid . JSON { } ,
} )
}
2023-11-05 01:58:00 +00:00
func GetContentPages ( c * fiber . Ctx ) error {
2023-11-20 21:20:26 +00:00
seasonString := strconv . Itoa ( aid . Config . Fortnite . Season )
2023-11-05 22:08:53 +00:00
2023-11-05 01:58:00 +00:00
return c . Status ( fiber . StatusOK ) . JSON ( aid . JSON {
"battlepassaboutmessages" : aid . JSON {
"news" : aid . JSON {
"messages" : [ ] aid . JSON { } ,
} ,
"lastModified" : "0000-00-00T00:00:00.000Z" ,
} ,
"subgameselectdata" : aid . JSON {
"saveTheWorldUnowned" : aid . JSON {
"message" : aid . JSON {
"title" : "Co-op PvE" ,
"body" : "Cooperative PvE storm-fighting adventure!" ,
"spotlight" : false ,
"hidden" : true ,
"messagetype" : "normal" ,
} ,
} ,
"battleRoyale" : aid . JSON {
"message" : aid . JSON {
"title" : "100 Player PvP" ,
"body" : "100 Player PvP Battle Royale.\n\nPvE progress does not affect Battle Royale." ,
"spotlight" : false ,
"hidden" : true ,
"messagetype" : "normal" ,
} ,
} ,
"creative" : aid . JSON {
"message" : aid . JSON {
"title" : "New Featured Islands!" ,
"body" : "Your Island. Your Friends. Your Rules.\n\nDiscover new ways to play Fortnite, play community made games with friends and build your dream island." ,
"spotlight" : false ,
"hidden" : true ,
"messagetype" : "normal" ,
} ,
} ,
"lastModified" : "0000-00-00T00:00:00.000Z" ,
} ,
2023-11-05 22:08:53 +00:00
"dynamicbackgrounds" : aid . JSON {
"backgrounds" : aid . JSON { "backgrounds" : [ ] aid . JSON {
2023-11-20 21:20:26 +00:00
{
"key" : "lobby" ,
"stage" : "season" + seasonString ,
} ,
{
"key" : "vault" ,
"stage" : "season" + seasonString ,
} ,
2023-11-05 22:08:53 +00:00
} } ,
"lastModified" : "0000-00-00T00:00:00.000Z" ,
} ,
2023-11-21 23:42:39 +00:00
"shopSections" : aid . JSON {
"sectionList" : aid . JSON {
"sections" : [ ] aid . JSON {
{
"bSortOffersByOwnership" : false ,
"bShowIneligibleOffersIfGiftable" : false ,
"bEnableToastNotification" : true ,
"background" : aid . JSON {
"stage" : "default" ,
"_type" : "DynamicBackground" ,
"key" : "vault" ,
} ,
"_type" : "ShopSection" ,
"landingPriority" : 0 ,
"bHidden" : false ,
"sectionId" : "Featured" ,
"bShowTimer" : true ,
"sectionDisplayName" : "Featured" ,
"bShowIneligibleOffers" : true ,
} ,
{
"bSortOffersByOwnership" : false ,
"bShowIneligibleOffersIfGiftable" : false ,
"bEnableToastNotification" : true ,
"background" : aid . JSON {
"stage" : "default" ,
"_type" : "DynamicBackground" ,
"key" : "vault" ,
} ,
"_type" : "ShopSection" ,
"landingPriority" : 1 ,
"bHidden" : false ,
"sectionId" : "Daily" ,
"bShowTimer" : true ,
"sectionDisplayName" : "Daily" ,
"bShowIneligibleOffers" : true ,
} ,
{
"bSortOffersByOwnership" : false ,
"bShowIneligibleOffersIfGiftable" : false ,
"bEnableToastNotification" : false ,
"background" : aid . JSON {
"stage" : "default" ,
"_type" : "DynamicBackground" ,
"key" : "vault" ,
} ,
"_type" : "ShopSection" ,
"landingPriority" : 2 ,
"bHidden" : false ,
"sectionId" : "Battlepass" ,
"bShowTimer" : false ,
"sectionDisplayName" : "Battle Pass" ,
"bShowIneligibleOffers" : false ,
} ,
{
"bSortOffersByOwnership" : false ,
"bShowIneligibleOffersIfGiftable" : false ,
"bEnableToastNotification" : false ,
"background" : aid . JSON {
"stage" : "default" ,
"_type" : "DynamicBackground" ,
"key" : "vault" ,
} ,
"_type" : "ShopSection" ,
"landingPriority" : 3 ,
"bHidden" : false ,
"sectionId" : "SnowSection" ,
"bShowTimer" : false ,
"sectionDisplayName" : "Snow Specials" ,
"bShowIneligibleOffers" : false ,
} ,
{
"bSortOffersByOwnership" : false ,
"bShowIneligibleOffersIfGiftable" : false ,
"bEnableToastNotification" : false ,
"background" : aid . JSON {
"stage" : "default" ,
"_type" : "DynamicBackground" ,
"key" : "vault" ,
} ,
"_type" : "ShopSection" ,
"landingPriority" : 3 ,
"bHidden" : false ,
"sectionId" : "OGBundles" ,
"bShowTimer" : false ,
"sectionDisplayName" : "OG Bundles" ,
"bShowIneligibleOffers" : false ,
} ,
} ,
} ,
"lastModified" : "0000-00-00T00:00:00.000Z" ,
} ,
2023-11-05 01:58:00 +00:00
"lastModified" : "0000-00-00T00:00:00.000Z" ,
} )
2023-11-03 23:48:50 +00:00
}