mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-01-03 21:26:35 +08:00
refactor: code optimization
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/pkg/utils"
|
||||
"mayfly-go/pkg/biz"
|
||||
"mayfly-go/pkg/req"
|
||||
"mayfly-go/pkg/utils/cryptox"
|
||||
)
|
||||
|
||||
type Common struct {
|
||||
@@ -19,7 +19,7 @@ func (c *Common) ReqConfs() *req.Confs {
|
||||
}
|
||||
|
||||
func (i *Common) RasPublicKey(rc *req.Ctx) {
|
||||
publicKeyStr, err := cryptox.GetRsaPublicKey()
|
||||
publicKeyStr, err := utils.GetRsaPublicKey()
|
||||
biz.ErrIsNilAppendErr(err, "rsa - failed to genenrate public key")
|
||||
rc.ResData = publicKeyStr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user