网关重启时恢复权限与分配数据
This commit is contained in:
@@ -6,10 +6,7 @@ import (
|
||||
"proxy-server/gateway/core"
|
||||
)
|
||||
|
||||
type PermitReq struct {
|
||||
Id int32 `json:"id"`
|
||||
core.Permit
|
||||
}
|
||||
type PermitReq []core.PermitDef
|
||||
|
||||
func Permit(ctx *fiber.Ctx) (err error) {
|
||||
|
||||
@@ -20,7 +17,7 @@ func Permit(ctx *fiber.Ctx) (err error) {
|
||||
}
|
||||
|
||||
// 获取请求参数
|
||||
req, err := core.Decrypt[[]PermitReq](&sec, app.PlatformSecret)
|
||||
req, err := core.Decrypt[PermitReq](&sec, app.PlatformSecret)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user