From 125f4c6660f4aa21c02c80fb861f55bdbbcb5e78 Mon Sep 17 00:00:00 2001 From: lijun Date: Tue, 14 Jan 2025 15:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AA=E7=8E=AF=E5=BC=95=E7=94=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/tool.go | 3 +-- proto/conf.go | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/handler/tool.go b/handler/tool.go index 0b2ab32..03e80f6 100644 --- a/handler/tool.go +++ b/handler/tool.go @@ -1,7 +1,6 @@ package handler import ( - "VideoStream/dao" "VideoStream/proto" "VideoStream/service" "VideoStream/worker" @@ -69,7 +68,7 @@ func GetVideoStream(c *gin.Context) { id, _ := c.Get("id") id1 := id.(int) //校验权限 - device := dao.FindDeviceByID(req.ID, id1) + device := service.GetDevice(req.ID, id1) if device.ID == 0 { c.JSON(400, gin.H{"error": "device not exist"}) return diff --git a/proto/conf.go b/proto/conf.go index eb92aeb..02abce4 100644 --- a/proto/conf.go +++ b/proto/conf.go @@ -82,8 +82,8 @@ func ReadConfig(path string) error { } worker.SetRedis("vp_stream_config", string(jsonData)) SigningKey = []byte(Config.TOKEN_SECRET) - //if Config.TOKEN_SECRET == "" { - // err = fmt.Errorf("token secret is empty: %s", string(jsonData)) - //} + if Config.TOKEN_SECRET == "" { + err = fmt.Errorf("token secret is empty: %s", string(jsonData)) + } return err }