Skip to content

Commit

Permalink
add customization of notion version-date by config/env
Browse files Browse the repository at this point in the history
  • Loading branch information
johguentner committed Jul 2, 2024
1 parent 2294243 commit 503f018
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
* Your Notion API token.
*/
'notion-api-token' => env('NOTION_API_TOKEN', ''),

'version-date' => env('NOTION_API_VERSION_DATE', '2021-05-13'),
];
2 changes: 1 addition & 1 deletion src/Notion.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ private function mapVersionToHeaderVersion(): string
{
switch ($this->version) {
case 'v1':
return '2021-05-13';
return config('laravel-notion-api.version-date', '2021-05-13');
default:
throw new HandlingException('Invalid version.');
}
Expand Down

0 comments on commit 503f018

Please sign in to comment.