From 503f01824e4f1f753a36a5693230c6b8b1968cbc Mon Sep 17 00:00:00 2001 From: johguentner Date: Tue, 2 Jul 2024 22:38:49 +0200 Subject: [PATCH] add customization of notion version-date by config/env --- config/config.php | 2 ++ src/Notion.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/config.php b/config/config.php index bce217a..95f8d2f 100644 --- a/config/config.php +++ b/config/config.php @@ -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'), ]; diff --git a/src/Notion.php b/src/Notion.php index 9d8f7ba..4594cf8 100644 --- a/src/Notion.php +++ b/src/Notion.php @@ -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.'); }