MCPcopy
hub / github.com/IceWhaleTech/CasaOS / PostNotifyMessage

Function PostNotifyMessage

route/v1/notify.go:12–21  ·  view source on GitHub ↗
(ctx echo.Context)

Source from the content-addressed store, hash-verified

10)
11
12func PostNotifyMessage(ctx echo.Context) error {
13 name := ctx.Param("name")
14 message := make(map[string]interface{})
15 if err := ctx.Bind(&message); err != nil {
16 return ctx.JSON(http.StatusBadRequest, model.Result{Success: common_err.INVALID_PARAMS, Message: err.Error()})
17 }
18
19 service.MyService.Notify().SendNotify(name, message)
20 return ctx.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS)})
21}
22
23func PostSystemStatusNotify(ctx echo.Context) error {
24 message := make(map[string]interface{})

Callers

nothing calls this directly

Calls 4

GetMsgFunction · 0.92
SendNotifyMethod · 0.65
NotifyMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected