refactor: move Firebase implementation to adapters/firebase, drop pexels interface
- Create internal/adapters/firebase/auth.go with Auth, noopAuth, NewAuthOrNoop (renamed from FirebaseAuth, noopTokenVerifier, NewFirebaseAuthOrNoop) - Reduce internal/auth/firebase.go to TokenVerifier interface only - Remove PhotoSearcher interface from adapters/pexels (belongs to consumers) - Update wire.go and wire_gen.go to use firebase.NewAuthOrNoop Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/food-ai/backend/internal/auth"
|
||||
"github.com/food-ai/backend/internal/adapters/firebase"
|
||||
"github.com/food-ai/backend/internal/infra/config"
|
||||
"github.com/food-ai/backend/internal/diary"
|
||||
"github.com/food-ai/backend/internal/dish"
|
||||
@@ -37,7 +38,7 @@ func initRouter(appConfig *config.Config, pool *pgxpool.Pool) (http.Handler, err
|
||||
newFirebaseCredentialsFile,
|
||||
|
||||
// Auth
|
||||
auth.NewFirebaseAuthOrNoop,
|
||||
firebase.NewAuthOrNoop,
|
||||
newJWTManager,
|
||||
newJWTAdapter,
|
||||
newAuthMiddleware,
|
||||
|
||||
Reference in New Issue
Block a user