(res http.ResponseWriter, req *http.Request)
| 8 | ) |
| 9 | |
| 10 | func HttpPushAll(res http.ResponseWriter, req *http.Request) { |
| 11 | _ = req.ParseForm() |
| 12 | val := req.FormValue("val") |
| 13 | tag := req.FormValue("tag") |
| 14 | if val == "" || tag == "" { |
| 15 | _, _ = res.Write([]byte("值为空")) |
| 16 | return |
| 17 | } |
| 18 | pushType, _ := strconv.Atoi(tag) |
| 19 | gateway.GetPushManage().Push(&gateway.PushJob{ |
| 20 | Type: 1, |
| 21 | PushType: pushType, |
| 22 | Info: val, |
| 23 | }) |
| 24 | _, _ = res.Write([]byte("全部推送任务添加成功")) |
| 25 | return |
| 26 | } |
| 27 | |
| 28 | func HttpPushRoom(res http.ResponseWriter, req *http.Request) { |
| 29 | _ = req.ParseForm() |
nothing calls this directly
no test coverage detected