增加插件安装功能并提升其他功能稳定性 (#1155)
* 增加安装插件demo * 前端上传demo * 插件安装初版 * 调整菜单结构 * fix: 修改密码校验 jwt 中的用户 id * router.go:fix logger的中间件是默认的,这边日志可以删除;cors的日志打印应当在上面两行启用的时候再进行注释 * 登陆==>登录 * 抽离插件安装方法 * 调整插件功能 提升灵活度 Co-authored-by: zeromake <a390720046@gmail.com> Co-authored-by: Lu JJ <275955589@qq.com> Co-authored-by: pnck <hio131@gmail.com> Co-authored-by: feixuanyu <994085848@qq.com>
This commit is contained in:
@@ -3,17 +3,16 @@ package system
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/utils"
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/utils"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
@@ -240,3 +239,18 @@ func (autoApi *AutoCodeApi) AutoPlug(c *gin.Context) {
|
||||
response.Ok(c)
|
||||
}
|
||||
}
|
||||
|
||||
func (autoApi *AutoCodeApi) InstallPlugin(c *gin.Context) {
|
||||
header, err := c.FormFile("plug")
|
||||
if err != nil {
|
||||
response.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
err = autoCodeService.InstallPlugin(header)
|
||||
if err != nil {
|
||||
response.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
} else {
|
||||
response.OkWithMessage("插件安装成功,请按照说明配置使用", c)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user