mirror of
https://github.com/R0m1k3/FlowReader.git
synced 2026-10-11 17:28:05 +02:00
feat(story-2.1): add feed model and add-feed-by-url API
This commit is contained in:
1 parent
dbea4b47af
commit
1249e1bd42
9 files changed
+781
-4
No files matched your search
@@ -38,12 +38,15 @@ func main() {
|
||||
// Initialize repositories
|
||||
userRepo := repository.NewUserRepository(pool)
|
||||
sessionRepo := repository.NewSessionRepository(pool)
|
||||
feedRepo := repository.NewFeedRepository(pool)
|
||||
|
||||
// Initialize services
|
||||
authService := service.NewAuthService(userRepo, sessionRepo)
|
||||
feedService := service.NewFeedService(feedRepo)
|
||||
|
||||
// Initialize handlers
|
||||
authHandler := handler.NewAuthHandler(authService)
|
||||
feedHandler := handler.NewFeedHandler(feedService, authService)
|
||||
|
||||
// Initialize router
|
||||
r := chi.NewRouter()
|
||||
@@ -84,6 +87,14 @@ func main() {
|
||||
r.Route("/users", func(r chi.Router) {
|
||||
r.Get("/me", authHandler.Me)
|
||||
})
|
||||
|
||||
// Feed routes
|
||||
r.Route("/feeds", func(r chi.Router) {
|
||||
r.Get("/", feedHandler.List)
|
||||
r.Post("/", feedHandler.Add)
|
||||
r.Get("/{id}", feedHandler.Get)
|
||||
r.Delete("/{id}", feedHandler.Delete)
|
||||
})
|
||||
})
|
||||
|
||||
// Create server
|
||||
|
||||
Reference in new issue
Block a user