Fixed some bugs and added Random Classic

This commit is contained in:
2024-07-28 15:58:12 +02:00
parent 59f1e2c75c
commit 51a74a9ed1
12 changed files with 152 additions and 16 deletions

View File

@@ -70,6 +70,7 @@ func SetupRestServer(swagger embed.FS) {
musicGroup.GET("reset", music.ResetMusic)
musicGroup.GET("rand", music.GetRandomSong)
musicGroup.GET("rand/low", music.GetRandomSongLowChance)
musicGroup.GET("rand/classic", music.GetRandomSongClassic)
musicGroup.GET("info", music.GetSongInfo)
musicGroup.GET("list", music.GetPlayedSongs)
musicGroup.GET("next", music.GetNextSong)
@@ -87,6 +88,7 @@ func SetupRestServer(swagger embed.FS) {
router.GET("/test", index.GetDBTest)
router.StaticFS("/swagger", helpers.EmbedFolder(swagger, "swagger", false))
router.Use(static.Serve("/", static.LocalFile("/frontend", true)))
router.Use(static.Serve("/new", static.LocalFile("/newFrontend", true)))
port := os.Getenv("PORT")
if port == "" {