Skip to content

Commit

Permalink
Revert "Serve game content and API"
Browse files Browse the repository at this point in the history
This reverts commit 6bd7deb.
  • Loading branch information
patapancakes committed Apr 19, 2024
1 parent 6bd7deb commit 0fec7cb
Show file tree
Hide file tree
Showing 4 changed files with 255 additions and 225 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
pokerogue-server*
userdata/*
secret.key
www/
24 changes: 1 addition & 23 deletions api/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,9 @@ import (
"github.com/pagefaultgames/pokerogue-server/db"
)

func Init(mux *http.ServeMux) {
func Init() {
scheduleStatRefresh()
daily.Init()

// account
mux.HandleFunc("GET /api/account/info", handleAccountInfo)
mux.HandleFunc("POST /api/account/register", handleAccountRegister)
mux.HandleFunc("POST /api/account/login", handleAccountLogin)
mux.HandleFunc("GET /api/account/logout", handleAccountLogout)

// game
mux.HandleFunc("GET /api/game/playercount", handleGamePlayerCount)
mux.HandleFunc("GET /api/game/titlestats", handleGameTitleStats)
mux.HandleFunc("GET /api/game/classicsessioncount", handleGameClassicSessionCount)

// savedata
mux.HandleFunc("GET /api/savedata/get", handleSaveData)
mux.HandleFunc("POST /api/savedata/update", handleSaveData)
mux.HandleFunc("GET /api/savedata/delete", handleSaveData)
mux.HandleFunc("POST /api/savedata/clear", handleSaveData)

// daily
mux.HandleFunc("GET /api/daily/seed", handleDailySeed)
mux.HandleFunc("GET /api/daily/rankings", handleDailyRankings)
mux.HandleFunc("GET /api/daily/rankingpagecount", handleDailyRankingPageCount)
}

func getUsernameFromRequest(r *http.Request) (string, error) {
Expand Down
Loading

0 comments on commit 0fec7cb

Please sign in to comment.