From ab540073964db3957867fabea8d55742515feee1 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期二, 12 十一月 2019 17:08:50 +0800
Subject: [PATCH] add log
---
controllers/camera.go | 1 +
middlewares/auth/auth.go | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/controllers/camera.go b/controllers/camera.go
index 83646ba..c676d6b 100644
--- a/controllers/camera.go
+++ b/controllers/camera.go
@@ -85,6 +85,7 @@
err := c.BindJSON(&cam)
if err != nil {
+ logger.Debug("err:",err)
util.ResponseFormat(c, code.RequestParamError, "鍙傛暟閿欒")
return
}
diff --git a/middlewares/auth/auth.go b/middlewares/auth/auth.go
index 6d80437..d897b00 100644
--- a/middlewares/auth/auth.go
+++ b/middlewares/auth/auth.go
@@ -56,7 +56,7 @@
return func(c *gin.Context) {
urlPath := c.Request.URL.Path
- if strings.Contains(urlPath,"/data/api-v") && !strings.Contains(urlPath,"login"){
+ if strings.Contains(urlPath,"/data/api-") && !strings.Contains(urlPath,"login"){
jwtDriver :=NewJwtAuthDriver()
if !jwtDriver.Check(c) {
util.ResponseFormat(c,code.TokenNotFound,"灏氭湭鐧诲綍锛岃鐧诲綍")
--
Gitblit v1.8.0