循环引用问题
This commit is contained in:
parent
52effbde93
commit
125f4c6660
|
|
@ -1,7 +1,6 @@
|
||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"VideoStream/dao"
|
|
||||||
"VideoStream/proto"
|
"VideoStream/proto"
|
||||||
"VideoStream/service"
|
"VideoStream/service"
|
||||||
"VideoStream/worker"
|
"VideoStream/worker"
|
||||||
|
|
@ -69,7 +68,7 @@ func GetVideoStream(c *gin.Context) {
|
||||||
id, _ := c.Get("id")
|
id, _ := c.Get("id")
|
||||||
id1 := id.(int)
|
id1 := id.(int)
|
||||||
//校验权限
|
//校验权限
|
||||||
device := dao.FindDeviceByID(req.ID, id1)
|
device := service.GetDevice(req.ID, id1)
|
||||||
if device.ID == 0 {
|
if device.ID == 0 {
|
||||||
c.JSON(400, gin.H{"error": "device not exist"})
|
c.JSON(400, gin.H{"error": "device not exist"})
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -82,8 +82,8 @@ func ReadConfig(path string) error {
|
||||||
}
|
}
|
||||||
worker.SetRedis("vp_stream_config", string(jsonData))
|
worker.SetRedis("vp_stream_config", string(jsonData))
|
||||||
SigningKey = []byte(Config.TOKEN_SECRET)
|
SigningKey = []byte(Config.TOKEN_SECRET)
|
||||||
//if Config.TOKEN_SECRET == "" {
|
if Config.TOKEN_SECRET == "" {
|
||||||
// err = fmt.Errorf("token secret is empty: %s", string(jsonData))
|
err = fmt.Errorf("token secret is empty: %s", string(jsonData))
|
||||||
//}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue