lab 4 na 4

This commit is contained in:
2026-11-05 13:52:11 +03:00
parent 14166003b8
commit f6292ac308
48 changed files with 2255 additions and 183 deletions
+3
View File
@@ -9,6 +9,7 @@ import (
"golang.org/x/sync/singleflight"
"mtusi2026/internal/auth"
"mtusi2026/internal/blobstore"
"mtusi2026/internal/cache"
"mtusi2026/internal/model"
"mtusi2026/internal/sessionstore"
@@ -22,6 +23,8 @@ type api struct {
sessionStore sessionstore.Store
chatCache *cache.Cache
chatFlight singleflight.Group
blobs blobstore.Store
uploadSem chan struct{}
}
func (a *api) authMiddleware(next func(w http.ResponseWriter, r *http.Request, u model.User, requestID string)) http.HandlerFunc {