mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
🎨 内核尚未完全启动的判断移到 API 层
This commit is contained in:
parent
23a30f0649
commit
15e2476126
2 changed files with 7 additions and 15 deletions
|
|
@ -49,6 +49,13 @@ func performTransactions(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
if !util.IsBooted() {
|
||||
ret.Code = -1
|
||||
ret.Msg = fmt.Sprintf(model.Conf.Language(74), int(util.GetBootProgress()))
|
||||
ret.Data = map[string]interface{}{"closeTimeout": 5000}
|
||||
return
|
||||
}
|
||||
|
||||
var transactions []*model.Transaction
|
||||
if err = gulu.JSON.UnmarshalJSON(data, &transactions); nil != err {
|
||||
ret.Code = -1
|
||||
|
|
@ -70,12 +77,6 @@ func performTransactions(c *gin.Context) {
|
|||
ret.Code = 1
|
||||
return
|
||||
}
|
||||
if model.ErrNotFullyBoot == err {
|
||||
ret.Code = -1
|
||||
ret.Msg = fmt.Sprintf(model.Conf.Language(74), int(util.GetBootProgress()))
|
||||
ret.Data = map[string]interface{}{"closeTimeout": 5000}
|
||||
return
|
||||
}
|
||||
if nil != err {
|
||||
tx, txErr := sql.BeginTx()
|
||||
if nil != txErr {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue