1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 19:43:49 +08:00
This commit is contained in:
wdvxdr 2020-12-20 19:14:42 +08:00
parent f258b010b9
commit 73774681af

View File

@ -334,14 +334,12 @@ func (c *websocketConn) handleRequest(bot *coolq.CQBot, payload []byte) {
defer c.Unlock() defer c.Unlock()
_ = c.WriteJSON(ret) _ = c.WriteJSON(ret)
} else { } else {
ret := global.MSG{ ret := coolq.Failed(1404,"API_NOT_FOUND","API不存在")
"status": "failed",
"retcode": 1404,
"data": nil,
}
if j.Get("echo").Exists() { if j.Get("echo").Exists() {
ret["echo"] = j.Get("echo").Value() ret["echo"] = j.Get("echo").Value()
} }
c.Lock()
defer c.Unlock()
_ = c.WriteJSON(ret) _ = c.WriteJSON(ret)
} }
} }