fix26: полный прод-фикс auth/jwt, import-export peer и frontend flow
This commit is contained in:
@@ -10,9 +10,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"hy2xs-admin/model/bo"
|
||||
"hy2xs-admin/model/constant"
|
||||
"hy2xs-admin/model/dto"
|
||||
"hy2xs-admin/model/entity"
|
||||
"hy2xs-admin/model/vo"
|
||||
"hy2xs-admin/service"
|
||||
"hy2xs-admin/util"
|
||||
@@ -147,12 +147,12 @@ func ImportPeer(c *gin.Context) {
|
||||
vo.Fail("json file read err", c)
|
||||
return
|
||||
}
|
||||
var accounts []entity.Account
|
||||
if err = json.Unmarshal(content, &accounts); err != nil {
|
||||
var peerExports []bo.PeerExport
|
||||
if err = json.Unmarshal(content, &peerExports); err != nil {
|
||||
vo.Fail("content Unmarshal err", c)
|
||||
return
|
||||
}
|
||||
if err = service.UpsertPeerLegacy(accounts); err != nil {
|
||||
if err = service.UpsertPeerExport(peerExports); err != nil {
|
||||
vo.Fail(err.Error(), c)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user