diff --git a/cmd/tr-server/main.go b/cmd/tr-server/main.go index 0dc0df7..cf5cd92 100644 --- a/cmd/tr-server/main.go +++ b/cmd/tr-server/main.go @@ -36,6 +36,9 @@ func main() { flag.Parse() portStr := strconv.Itoa(port) s.Ntfy = NtfyId + log.Printf("ntfyid: %s", NtfyId) //TODO delete + log.Printf("s.ntfy: %s", s.Ntfy) //TODO delete + log.Printf("standalone: %t", standalone) //TODO delete if standalone { err := SetPid(Address, portStr) diff --git a/cmd/tr-server/server.go b/cmd/tr-server/server.go index a2ae083..9a8c482 100644 --- a/cmd/tr-server/server.go +++ b/cmd/tr-server/server.go @@ -59,7 +59,7 @@ func (s *Server) GetSchedule(w http.ResponseWriter, r *http.Request) { return } // TODO delete this line - fmt.Println("ntfy sent") + log.Println("ntfy sent") } } w.Header().Set("Content-Type", "application/json") @@ -103,7 +103,7 @@ func (s *Server) GetCurrentTask(w http.ResponseWriter, r *http.Request) { return } // TODO delete this line - fmt.Println("ntfy sent") + log.Println("ntfy sent") } } msg, err := json.Marshal(map[string]struct { @@ -164,7 +164,7 @@ func (s *Server) ChangeCurrentTask(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusInternalServerError) return } - fmt.Println("ntfy sent") + log.Println("ntfy sent") } w.WriteHeader(http.StatusOK) } @@ -262,7 +262,7 @@ func (s *Server) BuildSchedule(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusInternalServerError) return } - fmt.Println("ntfy sent") + log.Println("ntfy sent") } w.WriteHeader(http.StatusOK) diff --git a/tr-server b/tr-server new file mode 100755 index 0000000..c342f19 Binary files /dev/null and b/tr-server differ