good morning!!!!

Skip to content
Snippets Groups Projects
Commit e8597b51 authored by a's avatar a
Browse files

patch

parent 9f7d774f
Branches
Tags v0.0.3 v0.0.4
No related merge requests found
......@@ -5,6 +5,6 @@ import jsoniter "github.com/json-iterator/go"
var json = jsoniter.Config{
EscapeHTML: true,
SortMapKeys: true,
ValidateJsonRawMessage: true,
ValidateJsonRawMessage: false,
CaseSensitive: true,
}.Froze()
......@@ -52,7 +52,14 @@ func (ws *WebsocketServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
var cmd command
err = json.Unmarshal(message, &cmd)
if err != nil {
return
c.WriteJSON(map[string]any{
"error": map[string]any{
"code": -32600,
"message": "invalid message",
"data": err.Error(),
},
})
continue
}
switch cmd.Method {
case "topic_subscribe":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment