From 933f2c41cf688c1730c578937cf6963e7c3e6b67 Mon Sep 17 00:00:00 2001 From: "Graham L. Brown" Date: Mon, 28 Aug 2023 21:27:53 -0600 Subject: [PATCH] Edits --- grellyddotcom.go | 12 ++++++------ handlers/handlers.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/grellyddotcom.go b/grellyddotcom.go index cf66522..50c19f7 100644 --- a/grellyddotcom.go +++ b/grellyddotcom.go @@ -18,7 +18,7 @@ import ( ) const ( - AddrHTTP = ":80" + AddrHTTP = ":3080" AddrHTTPS = ":443" ) @@ -111,10 +111,10 @@ func buildRouter() (*router.Router, error) { func registerRoutes() (*router.Router, error) { r := router.NewRouter() - // err := r.Register("/qrgen", "^/qrgen$", handlers.QRGen) - // if err != nil { - // return nil, fmt.Errorf("unable to register qrgen: %w", err) - // } + err := r.Register("/qrgen", "^/qrgen$", handlers.QRGen) + if err != nil { + return nil, fmt.Errorf("unable to register qrgen: %w", err) + } // err = r.Register("/", "(^/$)|(^/(status|about|quote|xmas)$)", handlers.File) // if err != nil { // return nil, fmt.Errorf("unable to register static: %w", err) @@ -151,7 +151,7 @@ func registerRoutes() (*router.Router, error) { // if err != nil { // return nil, fmt.Errorf("unable to register email: %w", err) // } - err := r.Register("/certs/", "^/certs/([a-zA-Z0-9_]*).html$", handlers.File) + err = r.Register("/certs/", "^/certs/([a-zA-Z0-9_]*).html$", handlers.File) if err != nil { return nil, fmt.Errorf("unable to register certs: %w", err) } diff --git a/handlers/handlers.go b/handlers/handlers.go index 6f67ecc..5db3cb9 100644 --- a/handlers/handlers.go +++ b/handlers/handlers.go @@ -14,7 +14,7 @@ import ( func QRGen(w http.ResponseWriter, r *http.Request) { fmt.Printf("r.RequestURI: %v\n", r.RequestURI) - path := "../pages/templates/qrgen.tmpl" + path := "./pages/templates/qrgen.tmpl" globallogger.Info("in qrgen")