From 970f48f48d1080c568c1d976e40e2570353ee232 Mon Sep 17 00:00:00 2001
From: 554325746@qq.com <554325746@qq.com>
Date: 星期三, 19 二月 2020 17:25:13 +0800
Subject: [PATCH] fix router
---
controllers/gb28181.go | 2 +-
router/router.go | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/controllers/gb28181.go b/controllers/gb28181.go
index 1aade15..9ff0955 100644
--- a/controllers/gb28181.go
+++ b/controllers/gb28181.go
@@ -45,7 +45,7 @@
// @Router /data/api-v/gb28181/newGbId [get]
func (gbc Gb28181Controller) NewGbId(c *gin.Context) {
areaCode := c.Query("code")
- if areaCode == "" || len(areaCode) != 6{
+ if areaCode == "" {
util.ResponseFormat(c, code.RequestParamError, "鍙傛暟鏈夎")
return
}
diff --git a/router/router.go b/router/router.go
index bb636d9..a7c5cea 100644
--- a/router/router.go
+++ b/router/router.go
@@ -96,7 +96,7 @@
gbApi := r.Group(urlPrefix + "/gb28181")
{
gbApi.GET("/findAreaByParentId", gb28181C.FindAreaByParentId)
- gbApi.GET("/newGbID",gb28181C.NewGbId)
+ gbApi.GET("/newGbId",gb28181C.NewGbId)
}
//鎽勫儚鏈虹鐞�
--
Gitblit v1.8.0