var rename

This commit is contained in:
2026-01-24 12:22:32 -07:00
parent 52b4d18236
commit 7154494016
+7 -7
View File
@@ -48,7 +48,7 @@ func NewRouter(
// TODO: shouldn't this ACTUALLY be a middleware? // TODO: shouldn't this ACTUALLY be a middleware?
// - only try to make this an actual middleware AFTER all the routers are broken out, so that way how the middleware is supposed to work can be known // - only try to make this an actual middleware AFTER all the routers are broken out, so that way how the middleware is supposed to work can be known
authMiddleware := middleware.NewAuth( authM := middleware.NewAuth(
logger.WithGroup("auth-middleware"), logger.WithGroup("auth-middleware"),
auth, auth,
//auth_api.NewLoginURL, //auth_api.NewLoginURL,
@@ -81,14 +81,14 @@ func NewRouter(
logger.WithGroup("templates"), logger.WithGroup("templates"),
r.Group( r.Group(
"/ui", "/ui",
authMiddleware.AddIdentity, authM.AddIdentity,
), ),
"/ui", "/ui",
contentDir, contentDir,
rawEvents, rawEvents,
accts, accts,
etsy, etsy,
authMiddleware, authM,
) )
// sse setup // sse setup
@@ -113,8 +113,8 @@ func NewRouter(
sse_api.Routes( sse_api.Routes(
api.Group( api.Group(
"/events", "/events",
authMiddleware.AddIdentity, authM.AddIdentity,
response.Handler(authMiddleware.Authenticate()), response.Handler(authM.Authenticate()),
), ),
apiLogger.WithGroup("/events"), apiLogger.WithGroup("/events"),
sq, sq,
@@ -122,8 +122,8 @@ func NewRouter(
accounts_api.Routes( accounts_api.Routes(
api.Group( api.Group(
"/accounts", "/accounts",
authMiddleware.AddIdentity, authM.AddIdentity,
response.Handler(authMiddleware.Authenticate()), response.Handler(authM.Authenticate()),
), ),
apiLogger.WithGroup("/accounts"), apiLogger.WithGroup("/accounts"),
accts, accts,