mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Improve data repo key importing https://github.com/siyuan-note/siyuan/issues/12183
This commit is contained in:
parent
efb3c5dd36
commit
6215e37418
4 changed files with 17 additions and 12 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue