(w http.ResponseWriter, r *http.Request)
| 82 | } |
| 83 | |
| 84 | func SendTestEmailFromWeb(w http.ResponseWriter, r *http.Request) { |
| 85 | taskID := r.PathValue("taskID") |
| 86 | status := r.PathValue("state") |
| 87 | if taskID == "" || status == "" { |
| 88 | fmt.Println("taskID or state is empey") |
| 89 | http.Error(w, "TaskID or state is empty", http.StatusUnauthorized) |
| 90 | return |
| 91 | } |
| 92 | num, err := strconv.Atoi(status) |
| 93 | if err != nil { |
| 94 | http.Error(w, err.Error(), http.StatusUnauthorized) |
| 95 | return |
| 96 | } |
| 97 | SendEmailNotify(taskID, num) |
| 98 | } |
nothing calls this directly
no test coverage detected