mirror of
https://github.com/R0m1k3/FlowReader.git
synced 2026-10-11 17:28:05 +02:00
feat(epic-4): synchro multi-appareils, outils d'admin et optimisations performance
This commit is contained in:
1 parent
dc26f22f51
commit
8777d3b970
10 files changed
+200
-27
No files matched your search
+9
-1
@@ -56,8 +56,9 @@ func main() {
|
||||
// Initialize handlers
|
||||
authHandler := handler.NewAuthHandler(authService)
|
||||
feedHandler := handler.NewFeedHandler(feedService, authService)
|
||||
articleHandler := handler.NewArticleHandler(articleRepo, feedService, authService)
|
||||
articleHandler := handler.NewArticleHandler(articleRepo, feedService, authService, hub)
|
||||
wsHandler := handler.NewWSHandler(hub, authService)
|
||||
adminHandler := handler.NewAdminHandler(userRepo, authService)
|
||||
|
||||
// Start background feed fetcher
|
||||
fetcher := worker.NewFeedFetcher(fetchService, 15*time.Minute, 5)
|
||||
@@ -129,6 +130,13 @@ func main() {
|
||||
|
||||
// WebSocket route
|
||||
r.Get("/ws", wsHandler.Connect)
|
||||
|
||||
// Admin routes
|
||||
r.Route("/admin", func(r chi.Router) {
|
||||
r.Use(adminHandler.AdminOnly)
|
||||
r.Get("/users", adminHandler.ListUsers)
|
||||
r.Delete("/users/{id}", adminHandler.DeleteUser)
|
||||
})
|
||||
})
|
||||
|
||||
// Create server
|
||||
|
||||
Reference in new issue
Block a user