Start routine at wakeup end
This commit is contained in:
parent
1def1ff67a
commit
e1f5fbcd6c
7 changed files with 101 additions and 16 deletions
|
|
@ -20,7 +20,7 @@ func declareAlarmRoutes(cfg *config.Config, router *gin.RouterGroup) {
|
|||
|
||||
router.POST("/alarm/run", func(c *gin.Context) {
|
||||
if player.CommonPlayer == nil {
|
||||
err := player.WakeUp(cfg)
|
||||
err := player.WakeUp(cfg, nil)
|
||||
if err != nil {
|
||||
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"errmsg": err.Error()})
|
||||
return
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import (
|
|||
|
||||
func declareAlarmsRoutes(cfg *config.Config, db *reveil.LevelDBStorage, resetTimer func(), router *gin.RouterGroup) {
|
||||
router.GET("/alarms/next", func(c *gin.Context) {
|
||||
alarm, err := reveil.GetNextAlarm(cfg, db)
|
||||
alarm, _, err := reveil.GetNextAlarm(cfg, db)
|
||||
if err != nil {
|
||||
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"errmsg": err.Error()})
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue