New route to test routine
All checks were successful
continuous-integration/drone/tag Build is passing
All checks were successful
continuous-integration/drone/tag Build is passing
This commit is contained in:
parent
e1f5fbcd6c
commit
d202cdfee8
3 changed files with 28 additions and 0 deletions
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue