Add run configs. Add redis for cache. Add cache-get in player-list.
This commit is contained in:
3
main.go
3
main.go
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user