Browse Source

增加是否自动创建api入库的开关 可自动产生api入库

QM303176530 4 years ago
parent
commit
a8099514e3
1 changed files with 1 additions and 2 deletions
  1. 1 2
      server/api/v1/sys_auto_code.go

+ 1 - 2
server/api/v1/sys_auto_code.go

@@ -21,7 +21,6 @@ import (
 func CreateTemp(c *gin.Context) {
 	var a model.AutoCodeStruct
 	_ = c.ShouldBindJSON(&a)
-	err := service.CreateTemp(a)
 	if a.AutoCreateApiToSql {
 		apiList := [5]model.SysApi{
 			{
@@ -64,7 +63,7 @@ func CreateTemp(c *gin.Context) {
 			}
 		}
 	}
-
+	err := service.CreateTemp(a)
 	if err != nil {
 		response.FailWithMessage(fmt.Sprintf("创建失败,%v", err), c)
 		os.Remove("./ginvueadmin.zip")