MCPcopy
hub / github.com/hwholiday/learning_tools / HttpPushAll

Function HttpPushAll

go_push/logic/http_handle.go:10–26  ·  view source on GitHub ↗
(res http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

8)
9
10func 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
28func HttpPushRoom(res http.ResponseWriter, req *http.Request) {
29 _ = req.ParseForm()

Callers

nothing calls this directly

Calls 3

GetPushManageFunction · 0.92
WriteMethod · 0.80
PushMethod · 0.65

Tested by

no test coverage detected