parent
aed259ac1f
commit
eeb8f08e19
|
@ -3,12 +3,13 @@ package system
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
systemRes "github.com/flipped-aurora/gin-vue-admin/server/model/system/response"
|
||||
"gorm.io/gorm"
|
||||
"strings"
|
||||
)
|
||||
|
||||
//@author: [piexlmax](https://github.com/piexlmax)
|
||||
|
@ -135,7 +136,7 @@ func (apiService *ApiService) IgnoreApi(ignoreApi system.SysIgnoreApi) (err erro
|
|||
func (apiService *ApiService) EnterSyncApi(syncApis systemRes.SysSyncApis) (err error) {
|
||||
return global.GVA_DB.Transaction(func(tx *gorm.DB) error {
|
||||
var txErr error
|
||||
if syncApis.NewApis != nil && len(syncApis.NewApis) > 0 {
|
||||
if len(syncApis.NewApis) > 0 {
|
||||
txErr = tx.Create(&syncApis.NewApis).Error
|
||||
if txErr != nil {
|
||||
return txErr
|
||||
|
|
Loading…
Reference in New Issue