监控接口不进行登录检测,修改接口错误返回
This commit is contained in:
parent
42942e8876
commit
b83195da91
|
|
@ -48,6 +48,10 @@ func SetDeviceStatusV2(c *gin.Context) {
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
token, _ := c.Get("token")
|
token, _ := c.Get("token")
|
||||||
|
if token == nil {
|
||||||
|
c.JSON(200, gin.H{"code": 401, "message": "token为空"})
|
||||||
|
return
|
||||||
|
}
|
||||||
devices := worker.GetRedisSetMembers(token.(string))
|
devices := worker.GetRedisSetMembers(token.(string))
|
||||||
if len(devices) == 0 {
|
if len(devices) == 0 {
|
||||||
c.JSON(200, gin.H{"code": 402, "message": "设备为空"})
|
c.JSON(200, gin.H{"code": 402, "message": "设备为空"})
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import (
|
||||||
|
|
||||||
var Config ConfigStruct
|
var Config ConfigStruct
|
||||||
var SigningKey = []byte{}
|
var SigningKey = []byte{}
|
||||||
var Url_map = map[string]bool{"/login": true, "/register": true, "/uuid": true, "/gqr": true, "/cid/callback": true}
|
var Url_map = map[string]bool{"/login": true, "/register": true, "/uuid": true, "/gqr": true, "/cid/callback": true, "/tool/monitor": true}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MYSQL_USER = "video_t2"
|
MYSQL_USER = "video_t2"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue