- QueryUnescape in mtwm GetCallbackMsg

This commit is contained in:
gazebo
2018-11-30 21:11:33 +08:00
parent 3e52f0b31f
commit d1d7678315

View File

@@ -59,8 +59,11 @@ func (a *API) GetCallbackMsg(request *http.Request) (msg *CallbackMsg, callbackR
cmd := strings.Trim(request.URL.EscapedPath(), "/")
cmd = cmd[strings.LastIndex(cmd, "/")+1:]
msg = &CallbackMsg{
Cmd: cmd,
Data: request.PostForm,
Cmd: cmd,
}
msg.Data = make(url.Values)
for k, v := range data {
msg.Data.Set(k, v.(string))
}
return msg, nil
}