New route to test routine
All checks were successful
continuous-integration/drone/tag Build is passing

This commit is contained in:
nemunaire 2022-12-08 19:33:51 +01:00
parent e1f5fbcd6c
commit d202cdfee8
3 changed files with 28 additions and 0 deletions

View file

@ -78,4 +78,12 @@ func declareRoutinesRoutes(cfg *config.Config, router *gin.RouterGroup) {
c.JSON(http.StatusOK, nil)
})
routinesRoutes.POST("/run", func(c *gin.Context) {
routine := c.MustGet("routine").(*reveil.Routine)
go routine.Launch(cfg)
c.JSON(http.StatusOK, true)
})
}