Commit 6b3bc10a by dliangx

update

parent f700eb60
...@@ -38,6 +38,8 @@ func SaveGeometry(ctx context.Context, c *app.RequestContext) { ...@@ -38,6 +38,8 @@ func SaveGeometry(ctx context.Context, c *app.RequestContext) {
} }
c.JSON(consts.StatusOK, resp) c.JSON(consts.StatusOK, resp)
return return
} else {
c.JSON(consts.StatusBadRequest, utils.H{"message": "opt value is not allow"})
} }
} }
...@@ -65,6 +67,8 @@ func UpdateGeometry(ctx context.Context, c *app.RequestContext) { ...@@ -65,6 +67,8 @@ func UpdateGeometry(ctx context.Context, c *app.RequestContext) {
} }
c.JSON(consts.StatusOK, resp) c.JSON(consts.StatusOK, resp)
return return
} else {
c.JSON(consts.StatusBadRequest, utils.H{"message": "opt value is not allow"})
} }
} }
...@@ -100,6 +104,8 @@ func GetGeometry(ctx context.Context, c *app.RequestContext) { ...@@ -100,6 +104,8 @@ func GetGeometry(ctx context.Context, c *app.RequestContext) {
} }
c.JSON(consts.StatusOK, resp) c.JSON(consts.StatusOK, resp)
return return
} else {
c.JSON(consts.StatusBadRequest, utils.H{"message": "opt value is not allow"})
} }
} }
...@@ -134,6 +140,8 @@ func DeleteGeometry(ctx context.Context, c *app.RequestContext) { ...@@ -134,6 +140,8 @@ func DeleteGeometry(ctx context.Context, c *app.RequestContext) {
} }
c.JSON(consts.StatusOK, resp) c.JSON(consts.StatusOK, resp)
return return
} else {
c.JSON(consts.StatusBadRequest, utils.H{"message": "opt value is not allow"})
} }
} }
...@@ -160,6 +168,8 @@ func FindRelatedGeometry(ctx context.Context, c *app.RequestContext) { ...@@ -160,6 +168,8 @@ func FindRelatedGeometry(ctx context.Context, c *app.RequestContext) {
} }
c.JSON(consts.StatusOK, resp) c.JSON(consts.StatusOK, resp)
return return
} else {
c.JSON(consts.StatusBadRequest, utils.H{"message": "opt value is not allow"})
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment