Skip to content

Commit 503f018

Browse files
committed
add customization of notion version-date by config/env
1 parent 2294243 commit 503f018

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

config/config.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@
1010
* Your Notion API token.
1111
*/
1212
'notion-api-token' => env('NOTION_API_TOKEN', ''),
13+
14+
'version-date' => env('NOTION_API_VERSION_DATE', '2021-05-13'),
1315
];

src/Notion.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ private function mapVersionToHeaderVersion(): string
258258
{
259259
switch ($this->version) {
260260
case 'v1':
261-
return '2021-05-13';
261+
return config('laravel-notion-api.version-date', '2021-05-13');
262262
default:
263263
throw new HandlingException('Invalid version.');
264264
}

0 commit comments

Comments
 (0)