This commit is contained in:
Daniel 2024-08-03 22:36:14 +08:00
parent efb3c5dd36
commit 6215e37418
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 17 additions and 12 deletions

View file

@ -350,12 +350,17 @@ func importRepoKey(c *gin.Context) {
}
base64Key := arg["key"].(string)
if err := model.ImportRepoKey(base64Key); nil != err {
retKey, err := model.ImportRepoKey(base64Key)
if nil != err {
ret.Code = -1
ret.Msg = fmt.Sprintf(model.Conf.Language(137), err)
ret.Data = map[string]interface{}{"closeTimeout": 5000}
return
}
ret.Data = map[string]interface{}{
"key": retKey,
}
}
func initRepoKeyFromPassphrase(c *gin.Context) {