Add run configs. Add redis for cache. Add cache-get in player-list.

This commit is contained in:
MaxJa4
2024-01-20 17:47:39 +01:00
parent 9e3e2723d3
commit 069d76520e
10 changed files with 124 additions and 9 deletions

View File

@@ -70,6 +70,7 @@ func main() {
admin.Use(AdminAuthRequired())
models.ConnectDatabase()
models.ConnectCache()
f, _ := os.OpenFile("isc_rest.log", os.O_RDWR|os.O_APPEND|os.O_CREATE, 0660)
utils.GinWriter = io.MultiWriter(f, os.Stdout)
@@ -111,6 +112,8 @@ func main() {
protected.PATCH("/player/:id", controllers.UpdatePlayerByID)
protected.DELETE("/player/:id", controllers.DeletePlayerByID)
protected.GET("/cache/:player_id", controllers.GetCacheByPlayerID)
protected.GET("/game", controllers.GetGames)
protected.GET("/game_html", controllers.GetGamesHTML)