From 2bdfb2f00cc47ad23022117ddf7bd6daef970741 Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Mon, 20 May 2024 16:58:25 +0100 Subject: [PATCH] Just changed some comments --- faxSrc/main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/faxSrc/main.go b/faxSrc/main.go index 138af8d..132fd55 100644 --- a/faxSrc/main.go +++ b/faxSrc/main.go @@ -12,8 +12,7 @@ func checkMethod(method string, r *http.Request) bool { } func main() { - // Set up a very basic http server - // TODO: display users main page on / + // GET calls http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { if !checkMethod(http.MethodGet, r) { w.WriteHeader(http.StatusMethodNotAllowed) @@ -23,7 +22,7 @@ func main() { controllers.EditorPage(w, r) }) - // Both should be POST only + // POST calls http.HandleFunc("/send-fax", func(w http.ResponseWriter, r *http.Request) { if !checkMethod(http.MethodPost, r) { w.WriteHeader(http.StatusMethodNotAllowed)