mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
This commit is contained in:
parent
9779184906
commit
e771fe7d7b
1 changed files with 8 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/88250/gulu"
|
"github.com/88250/gulu"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
@ -33,7 +34,13 @@ func pushMsg(c *gin.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
msg := arg["msg"].(string)
|
msg := strings.TrimSpace(arg["msg"].(string))
|
||||||
|
if "" == msg {
|
||||||
|
ret.Code = -1
|
||||||
|
ret.Msg = "msg can't be empty"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
timeout := 7000
|
timeout := 7000
|
||||||
if nil != arg["timeout"] {
|
if nil != arg["timeout"] {
|
||||||
timeout = int(arg["timeout"].(float64))
|
timeout = int(arg["timeout"].(float64))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue