Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ksvirkou-hubspot committed Aug 21, 2020
2 parents 3851793 + 91a07ac commit fb41379
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 34 deletions.
66 changes: 33 additions & 33 deletions sample-apps/timeline-app/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion sample-apps/timeline-app/src/Helpers/TimelineEventHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fb41379

Please sign in to comment.