fix26: полный прод-фикс auth/jwt, import-export peer и frontend flow

This commit is contained in:
2026-05-09 01:18:13 +05:00
parent 7a64d76d08
commit c13841b61a
19 changed files with 390 additions and 90 deletions
+4 -4
View File
@@ -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
}