Shorten url param

This commit is contained in:
Ian Gulliver
2024-11-23 06:35:38 -08:00
parent e5ad2059a0
commit d6be7a5d2c
2 changed files with 7 additions and 7 deletions

View File

@@ -56,8 +56,8 @@ func (ph *PHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
log.Printf("%s %s", r.RemoteAddr, r.Form.Encode())
msg := r.Form.Get("msg")
if msg == "" {
m := r.Form.Get("m")
if m == "" {
err = ph.tmpl.Execute(w, ph.envs())
if err != nil {
http.Error(w, fmt.Sprintf("execute %s: %s\n", ph.tmpl.Name(), err), http.StatusBadRequest)
@@ -72,7 +72,7 @@ func (ph *PHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
RoutingKey: ph.routingKey,
EventAction: "trigger",
Payload: PDPayload{
Summary: msg,
Summary: m,
Source: r.RemoteAddr,
Severity: "critical",
},