This commit is contained in:
Liang Ding 2022-06-18 23:11:03 +08:00
parent f23764fee0
commit 0361de475f
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
7 changed files with 17 additions and 9 deletions

View file

@ -18,7 +18,7 @@ package model
import (
"crypto/rand"
"encoding/hex"
"encoding/base64"
"errors"
"fmt"
"os"
@ -59,10 +59,10 @@ func GetRepoIndexLogs(page int) (logs []*dejavu.Log, pageCount, totalCount int,
return
}
func ImportRepoKey(hexKey string) (err error) {
func ImportRepoKey(base64Key string) (err error) {
msgId := util.PushMsg(Conf.Language(136), 1000*7)
key, err := hex.DecodeString(hexKey)
key, err := base64.StdEncoding.DecodeString(base64Key)
if nil != err {
return
}