mirror of
https://github.com/flipped-aurora/gin-vue-admin.git
synced 2026-09-21 12:32:25 +00:00
system add middleware, update markfile, add data
This commit is contained in:
@@ -18,7 +18,7 @@ var DataAuthorityId = []SysDataAuthorityId{
|
||||
}
|
||||
|
||||
func InitSysDataAuthorityId(db *gorm.DB) (err error) {
|
||||
return db.Transaction(func(tx *gorm.DB) error {
|
||||
return db.Table("sys_data_authority_id").Transaction(func(tx *gorm.DB) error {
|
||||
if tx.Create(&DataAuthorityId).Error != nil { // 遇到错误时回滚事务
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ var AuthorityMenus = []SysAuthorityMenus{
|
||||
}
|
||||
|
||||
func InitSysAuthorityMenus(db *gorm.DB) (err error) {
|
||||
return db.Transaction(func(tx *gorm.DB) error {
|
||||
return db.Table("sys_authority_menus").Transaction(func(tx *gorm.DB) error {
|
||||
if tx.Create(&AuthorityMenus).Error != nil { // 遇到错误时回滚事务
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ var Carbines = []gormadapter.CasbinRule{
|
||||
{PType: "p", V0: "888", V1: "/jwt/jsonInBlacklist", V2: "POST"},
|
||||
{PType: "p", V0: "888", V1: "/system/getSystemConfig", V2: "POST"},
|
||||
{PType: "p", V0: "888", V1: "/system/setSystemConfig", V2: "POST"},
|
||||
{PType: "p", V0: "888", V1: "/system/getServerInfo", V2: "POST"},
|
||||
{PType: "p", V0: "888", V1: "/customer/customer", V2: "POST"},
|
||||
{PType: "p", V0: "888", V1: "/customer/customer", V2: "PUT"},
|
||||
{PType: "p", V0: "888", V1: "/customer/customer", V2: "DELETE"},
|
||||
@@ -69,6 +70,9 @@ var Carbines = []gormadapter.CasbinRule{
|
||||
{PType: "p", V0: "888", V1: "/sysOperationRecord/deleteSysOperationRecordByIds", V2: "DELETE"},
|
||||
{PType: "p", V0: "888", V1: "/user/setUserInfo", V2: "PUT"},
|
||||
{PType: "p", V0: "888", V1: "/email/emailTest", V2: "POST"},
|
||||
{PType: "p", V0: "888", V1: "/simpleUploader/upload", V2: "POST"},
|
||||
{PType: "p", V0: "888", V1: "/simpleUploader/checkFileMd5", V2: "GET"},
|
||||
{PType: "p", V0: "888", V1: "/simpleUploader/mergeFileMd5", V2: "GET"},
|
||||
{PType: "p", V0: "8881", V1: "/base/login", V2: "POST"},
|
||||
{PType: "p", V0: "8881", V1: "/base/register", V2: "POST"},
|
||||
{PType: "p", V0: "8881", V1: "/api/createApi", V2: "POST"},
|
||||
|
||||
Reference in New Issue
Block a user