summaryrefslogtreecommitdiff
path: root/internal/server
diff options
context:
space:
mode:
authorGrailFinder <wohilas@gmail.com>2024-04-28 07:03:36 +0300
committerGrailFinder <wohilas@gmail.com>2024-04-28 07:03:36 +0300
commit8d66ec58e2256412a2fd50ad9e651c09af1ea8cc (patch)
tree23ad5c78ba2b2da32628e9004fe932e6fa63e26b /internal/server
parentb33be53ea9c0be523988a9412fd8e3f6a24782b3 (diff)
Feat: auth middleware; login [wip]
Diffstat (limited to 'internal/server')
-rw-r--r--internal/server/router.go4
1 files changed, 2 insertions, 2 deletions
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,
}