diff --git a/sample-apps/timeline-app/docker-compose.yml b/sample-apps/timeline-app/docker-compose.yml index d70e2694..5dc736da 100644 --- a/sample-apps/timeline-app/docker-compose.yml +++ b/sample-apps/timeline-app/docker-compose.yml @@ -1,36 +1,36 @@ version: '3.5' services: - web: - env_file: - - .env - build: - dockerfile: ./sample-apps/timeline-app/Dockerfile - context: ../../ - depends_on: - - db - command: dockerize -wait-retry-interval 5s -timeout 30s -wait tcp://db:3306 /usr/bin/supervisord - ports: - - 8999:80 - environment: - DB_HOST: db - DB_NAME: timeline - DB_USERNAME: timeline - DB_PASSWORD: timeline - volumes: - - ./src:/app/src - - ./sql:/app/sql - db: - image: mysql:8.0 - command: mysqld --default-authentication-plugin=mysql_native_password - volumes: - - ./db/mysql:/var/lib/mysql - ports: - - 3306:3306 - logging: - driver: none - environment: - MYSQL_ROOT_PASSWORD: root - MYSQL_DATABASE: timeline - MYSQL_USER: timeline - MYSQL_PASSWORD: timeline + web: + env_file: + - .env + build: + dockerfile: ./sample-apps/timeline-app/Dockerfile + context: ../../ + depends_on: + - db + command: dockerize -wait-retry-interval 5s -timeout 30s -wait tcp://db:3306 /usr/bin/supervisord + ports: + - 8999:80 + environment: + DB_HOST: db + DB_NAME: timeline + DB_USERNAME: timeline + DB_PASSWORD: timeline + volumes: + - ./src:/app/src + - ./sql:/app/sql + db: + image: mysql:8.0 + command: mysqld --default-authentication-plugin=mysql_native_password + volumes: + - ./db/mysql:/var/lib/mysql + ports: + - 3306:3306 + logging: + driver: none + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: timeline + MYSQL_USER: timeline + MYSQL_PASSWORD: timeline diff --git a/sample-apps/timeline-app/src/Helpers/TimelineEventHelper.php b/sample-apps/timeline-app/src/Helpers/TimelineEventHelper.php index 31f2329b..1f0dfab9 100644 --- a/sample-apps/timeline-app/src/Helpers/TimelineEventHelper.php +++ b/sample-apps/timeline-app/src/Helpers/TimelineEventHelper.php @@ -16,7 +16,10 @@ public static function createEvent(string $telegramChatId, string $eventTypeCode $request->setId(uniqid()); $request->setEmail(UsersRepository::getEmailByTelegramChatId($telegramChatId)); $request->setEventTemplateId(EventTypesRepository::getHubspotEventIDByCode($eventTypeCode)); - $request->setTokens($tokens); + + if (!empty($tokens)) { + $request->setTokens($tokens); + } return HubspotClientHelper::createFactory()->crm()->timeline() ->eventsApi()->create($request);