wfc-server/api/main.go
2026-04-05 09:57:09 -04:00

33 lines
400 B
Go

package api
import (
"wwfc/common"
"wwfc/database"
)
var (
db database.Connection
apiSecret string
)
func StartServer(reload bool) {
// Get config
config := common.GetConfig()
apiSecret = config.APISecret
// Start SQL
db = database.Start(config)
db.RegisterEvents(config, []string{
"profile_kicked",
"profile_banned",
"profile_unbanned",
})
}
func Shutdown() {
db.Close()
}