caipin il y a 4 ans
Parent
commit
87f7d9e34c
3 fichiers modifiés avec 6 ajouts et 6 suppressions
  1. 2 2
      lib/permission.json
  2. 2 2
      web/api/quality_api.go
  3. 2 2
      web/api/safe_api.go

+ 2 - 2
lib/permission.json

@@ -50,7 +50,7 @@
             "/api/safe"
         ],
         "delete": [
-            "/api/safe"
+            "/api/safe/del"
         ]
     },
     "quality": {
@@ -66,7 +66,7 @@
             "/api/quality"
         ],
         "delete": [
-            "/api/quality"
+            "/api/quality/del"
         ]
     },
     "projectSetting": []

+ 2 - 2
web/api/quality_api.go

@@ -139,8 +139,8 @@ func (c *QualityApi) Post() {
 // @Param   id     body    string     true        "质量巡检ID"
 // @Success 200 {object} viewmodels.Quality "{code:0成功,msg:}"
 // @Failure 400 {string} string	"{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}"
-// @Router /api/quality [delete]
-func (c *QualityApi) Delete() {
+// @Router /api/quality/del [delete]
+func (c *QualityApi) DeleteDel() {
 	queryId := c.Ctx.URLParam("id")
 	if queryId == "" {
 		c.Ctx.JSON(iris.Map{"code": -1, "msg": "id不存在"})

+ 2 - 2
web/api/safe_api.go

@@ -141,8 +141,8 @@ func (c *SafeApi) Post() {
 // @Param   id     body    string     true        "安全巡检ID"
 // @Success 200 {object} viewmodels.Safe "{code:0成功,msg:}"
 // @Failure 400 {string} string	"{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}"
-// @Router /api/safe [delete]
-func (c *SafeApi) Delete() {
+// @Router /api/safe/del [delete]
+func (c *SafeApi) DeleteDel() {
 	queryId := c.Ctx.URLParam("id")
 	if queryId == "" {
 		c.Ctx.JSON(iris.Map{"code": -1, "msg": "id不存在"})