Skip to content

Commit 4f1818c

Browse files
authored
Merge pull request #57 from tanhongit/develop
Refactor config
2 parents 6618e27 + 921fa7c commit 4f1818c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

config/telegram-git-notifier.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
$configFileStorageFolder = storage_path(
44
env('TGN_CONFIG_FILE_STORAGE_FOLDER', '/app/vendor/tg-notifier/jsons')
55
);
6+
$routePrefix = env('TGN_DEFAULT_ROUTE_PREFIX', 'telegram-git-notifier');
67

78
return [
89
'defaults' => [
@@ -11,15 +12,15 @@
1112
],
1213

1314
/* Set route prefix for telegram git notifier app */
14-
'route_prefix' => env('TGN_DEFAULT_ROUTE_PREFIX', 'telegram-git-notifier'),
15+
'route_prefix' => $routePrefix,
1516
],
1617

1718
'app' => [
1819
'name' => env('TGN_APP_NAME', 'Laravel Telegram Git Notifier'),
20+
'timezone' => env('TIMEZONE', 'Asia/Ho_Chi_Minh'),
1921

2022
/* Required for the bot to work properly */
21-
'url' => env('TGN_APP_URL', 'http://localhost:8000/telegram-git-notifier'),
22-
'timezone' => env('TIMEZONE', 'Asia/Ho_Chi_Minh'),
23+
'url' => env('TGN_APP_URL', env('APP_URL', 'http://localhost')).'/'.$routePrefix,
2324
],
2425

2526
'bot' => [

0 commit comments

Comments
 (0)