diff --git a/cmd/api/init/app/init.go b/cmd/api/init/app/init.go index 315763b..83b123d 100644 --- a/cmd/api/init/app/init.go +++ b/cmd/api/init/app/init.go @@ -103,7 +103,7 @@ func Init(db *pgxpool.Pool, redis *redis.Client, log *logger.Logger) *mux.Router csrfMiddlewear := middleware.NewCSRFMiddleware(csrfUsecase, *log) userHandler := userDelivery.NewHandler(userUsecase, *log) - transactionHandler := transactionDelivery.NewHandler(transactionUsecase, *log) + transactionHandler := transactionDelivery.NewHandler(transactionUsecase, userUsecase, *log) categoryHandler := categoryDelivary.NewHandler(categortClient, *log) csrfHandler := csrfDelivery.NewHandler(csrfUsecase, *log) accountHandler := accountDelivery.NewHandler(accountClient, *log) diff --git a/internal/common/http/request_handler.go b/internal/common/http/request_handler.go index 9560a38..03e00d4 100644 --- a/internal/common/http/request_handler.go +++ b/internal/common/http/request_handler.go @@ -127,6 +127,6 @@ func GetIpFromRequest(r *http.Request) (string, error) { return "", errors.New("IP not found") } -func GetGoalIdFromRequest(r *http.Request) { - return -} +// func GetGoalIdFromRequest(r *http.Request) { +// return +// } diff --git a/internal/microservices/user/repository/postgresql/postgres.go b/internal/microservices/user/repository/postgresql/postgres.go index 7628f5b..0a2c0d2 100644 --- a/internal/microservices/user/repository/postgresql/postgres.go +++ b/internal/microservices/user/repository/postgresql/postgres.go @@ -84,7 +84,7 @@ func (r *UserRep) GetByID(ctx context.Context, userID uuid.UUID) (*models.User, fmt.Errorf("failed request db %s, %w", UserIDGetByID, err) } - return nil, nil + return &u, nil } func (r *UserRep) GetUserByLogin(ctx context.Context, login string) (*models.User, error) {