浏览代码

调试功能:token设置

zou.yingbin 4 年之前
父节点
当前提交
acb7ef4cf5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      controllers/other/settoken.go

+ 1 - 1
controllers/other/settoken.go

@@ -18,7 +18,7 @@ func SetToken(c *gin.Context) {
 	host := c.Request.Host
 	if strings.Contains(host, `192.168.`) || strings.Contains(host, `localhost`) {
 		if cli := rediscli.GetRedisClient(); cli != nil {
-			_ = cli.HSet("\"monitor:online_loginid:778899:1\"", "Token", "778899_123456_1")
+			_ = cli.HSet("monitor:online_loginid:778899:1", "Token", "778899_123456_1")
 			c.String(http.StatusOK, `设置成功!(仅当内网且调试模式下才可设置), token:778899_123456_1`)
 		} else {
 			c.String(http.StatusOK, "not connect redis")