There was an error while loading. Please reload this page.
1 parent 7bc7c30 commit b1b7427Copy full SHA for b1b7427
server/api/v1/system/sys_auto_code.go
@@ -5,6 +5,7 @@ import (
5
"fmt"
6
"net/url"
7
"os"
8
+"path/filepath"
9
"strings"
10
11
"github.com/flipped-aurora/gin-vue-admin/server/global"
@@ -253,6 +254,11 @@ func (autoApi *AutoCodeApi) AutoPlug(c *gin.Context) {
253
254
response.FailWithMessage(err.Error(), c)
255
return
256
}
257
+if strings.Contains(a.PlugName, string(filepath.Separator)) {
258
+response.FailWithMessage("插件名称不能包含"+string(filepath.Separator), c)
259
+return
260
+}
261
+
262
a.Snake = strings.ToLower(a.PlugName)
263
a.NeedModel = a.HasRequest || a.HasResponse
264
err = autoCodeService.CreatePlug(a)
0 commit comments