Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
fbc357f3c4
2 changed files with 8 additions and 0 deletions
|
@ -247,6 +247,7 @@ func importRepoKey(c *gin.Context) {
|
|||
if err := model.ImportRepoKey(base64Key); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = fmt.Sprintf(model.Conf.Language(137), err)
|
||||
ret.Data = map[string]interface{}{"closeTimeout": 5000}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -258,6 +259,7 @@ func initRepoKey(c *gin.Context) {
|
|||
if err := model.InitRepoKey(); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = fmt.Sprintf(model.Conf.Language(137), err)
|
||||
ret.Data = map[string]interface{}{"closeTimeout": 5000}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -273,6 +275,7 @@ func resetRepo(c *gin.Context) {
|
|||
if err := model.ResetRepo(); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = fmt.Sprintf(model.Conf.Language(146), err.Error())
|
||||
ret.Data = map[string]interface{}{"closeTimeout": 5000}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,6 +83,10 @@ func ImportRepoKey(base64Key string) (err error) {
|
|||
util.LogErrorf("import data repo key failed: %s", err)
|
||||
return errors.New(Conf.Language(157))
|
||||
}
|
||||
if 32 != len(key) {
|
||||
return errors.New(Conf.Language(157))
|
||||
}
|
||||
|
||||
Conf.Repo.Key = key
|
||||
Conf.Save()
|
||||
|
||||
|
@ -429,6 +433,7 @@ func syncRepo(boot, exit, byHand bool) {
|
|||
msg := Conf.Language(26)
|
||||
util.PushStatusBar(msg)
|
||||
util.PushErrMsg(msg, 0)
|
||||
planSyncAfter(30 * time.Second)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue