mirror of
https://github.com/quarkcloudio/quark-go.git
synced 2025-09-26 20:11:11 +08:00
feat:增加设置表单路由、去除同步权限删除自定义权限
This commit is contained in:
@@ -100,10 +100,5 @@ func (p *SyncPermissionAction) Handle(ctx *builder.Context, query *gorm.DB) erro
|
||||
return ctx.JSON(200, message.Error(err.Error()))
|
||||
}
|
||||
|
||||
err = db.Client.Model(&model.Permission{}).Where("name NOT IN ?", currentNames).Delete("").Error
|
||||
if err != nil {
|
||||
return ctx.JSON(200, message.Error(err.Error()))
|
||||
}
|
||||
|
||||
return ctx.JSON(200, message.Success("操作成功"))
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@ const (
|
||||
ExportPath = "/api/admin/:resource/export" // 导出数据路径
|
||||
DetailPath = "/api/admin/:resource/detail" // 导入数据路径
|
||||
ImportTemplatePath = "/api/admin/:resource/import/template" // 导入模板路径
|
||||
SettingFormPath = "/api/admin/:resource/setting/form" // 设置表单路径
|
||||
FormPath = "/api/admin/:resource/:uriKey/form" // 通用表单资源路径
|
||||
)
|
||||
|
||||
@@ -94,6 +95,7 @@ func (p *Template) RouteInit() interface{} {
|
||||
p.GET(ExportPath, p.ExportRender) // 导出数据
|
||||
p.POST(ImportPath, p.ImportRender) // 导入数据
|
||||
p.GET(ImportTemplatePath, p.ImportTemplateRender) // 导入模板
|
||||
p.GET(SettingFormPath, p.FormRender) // 设置表单
|
||||
p.GET(FormPath, p.FormRender) // 通用表单资源
|
||||
|
||||
return p
|
||||
|
Reference in New Issue
Block a user