From 8d66ec58e2256412a2fd50ad9e651c09af1ea8cc Mon Sep 17 00:00:00 2001 From: GrailFinder Date: Sun, 28 Apr 2024 07:03:36 +0300 Subject: Feat: auth middleware; login [wip] --- internal/server/router.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/server') diff --git a/internal/server/router.go b/internal/server/router.go index 36c2083..3e8785f 100644 --- a/internal/server/router.go +++ b/internal/server/router.go @@ -10,8 +10,8 @@ func (srv *server) ListenToRequests() { h := srv.actions mux := http.NewServeMux() server := &http.Server{ - Addr: fmt.Sprintf("localhost:%d", srv.config.ServerConfig), - Handler: mux, + Addr: fmt.Sprintf("localhost:%s", srv.config.ServerConfig.Port), + Handler: h.GetSession(mux), ReadTimeout: time.Second * 5, WriteTimeout: time.Second * 5, } -- cgit v1.2.3