Introduce streams
This commit is contained in:
parent
bbde2299fe
commit
8e948fc451
4 changed files with 38 additions and 29 deletions
|
|
@ -47,7 +47,7 @@ func declareInputsRoutes(cfg *config.Config, router *gin.RouterGroup) {
|
|||
inputsRoutes.GET("/settings", func(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, c.MustGet("input"))
|
||||
})
|
||||
inputsRoutes.GET("/currently", func(c *gin.Context) {
|
||||
inputsRoutes.GET("/streams", func(c *gin.Context) {
|
||||
src := c.MustGet("input").(inputs.SoundInput)
|
||||
|
||||
if !src.IsActive() {
|
||||
|
|
@ -58,7 +58,7 @@ func declareInputsRoutes(cfg *config.Config, router *gin.RouterGroup) {
|
|||
c.JSON(http.StatusOK, src.CurrentlyPlaying())
|
||||
})
|
||||
|
||||
streamRoutes := inputsRoutes.Group("/stream/:stream")
|
||||
streamRoutes := inputsRoutes.Group("/streams/:stream")
|
||||
streamRoutes.Use(StreamHandler)
|
||||
|
||||
streamRoutes.POST("/pause", func(c *gin.Context) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue