1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-11 17:42:48 +00:00

client: updated everything, deprecated pubg stuff

This commit is contained in:
2018-04-09 20:28:36 -05:00
parent 1f4cb18d21
commit 0fe7468506
43 changed files with 12857 additions and 11121 deletions

View File

@@ -1,5 +1,10 @@
package pubg
/**
* DEPRECATED
* I no longer have a use for this so I'm ripping it out
*/
import (
"sync"
"time"

View File

@@ -5,7 +5,6 @@ import (
"github.com/mgerb/go-discord-bot/server/config"
"github.com/mgerb/go-discord-bot/server/webserver/handlers"
"github.com/mgerb/go-discord-bot/server/webserver/middleware"
"github.com/mgerb/go-discord-bot/server/webserver/pubg"
)
func getRouter() *gin.Engine {
@@ -17,11 +16,10 @@ func getRouter() *gin.Engine {
router.Static("/public/clips", config.Config.ClipsPath)
router.NoRoute(func(c *gin.Context) {
c.File("./dist/index.html")
c.File("./dist/static/index.html")
})
api := router.Group("/api")
api.GET("/stats/pubg", pubg.Handler)
api.GET("/ytdownloader", handlers.Downloader)
api.GET("/soundlist", handlers.SoundList)
api.GET("/cliplist", handlers.ClipList)
@@ -37,11 +35,6 @@ func getRouter() *gin.Engine {
// Start -
func Start() {
// start gathering pubg data from the api
if config.Config.Pubg.Enabled {
pubg.Start(config.Config.Pubg.APIKey, config.Config.Pubg.Players)
}
router := getRouter()
router.Run(config.Config.ServerAddr)
}