diff --git a/src/Appwrite/Platform/Modules/Advisor/Http/Insights/Get.php b/src/Appwrite/Platform/Modules/Advisor/Http/Insights/Get.php index 4796d5851f..d605cacaef 100644 --- a/src/Appwrite/Platform/Modules/Advisor/Http/Insights/Get.php +++ b/src/Appwrite/Platform/Modules/Advisor/Http/Insights/Get.php @@ -36,7 +36,7 @@ class Get extends Action group: 'insights', name: 'getInsight', description: '/docs/references/advisor/get-insight.md', - auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Advisor/Http/Insights/XList.php b/src/Appwrite/Platform/Modules/Advisor/Http/Insights/XList.php index 64d3676c08..6cf779bfb9 100644 --- a/src/Appwrite/Platform/Modules/Advisor/Http/Insights/XList.php +++ b/src/Appwrite/Platform/Modules/Advisor/Http/Insights/XList.php @@ -42,7 +42,7 @@ class XList extends Action group: 'insights', name: 'listInsights', description: '/docs/references/advisor/list-insights.md', - auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Advisor/Http/Reports/Get.php b/src/Appwrite/Platform/Modules/Advisor/Http/Reports/Get.php index 78885a7c5d..e912161e26 100644 --- a/src/Appwrite/Platform/Modules/Advisor/Http/Reports/Get.php +++ b/src/Appwrite/Platform/Modules/Advisor/Http/Reports/Get.php @@ -37,7 +37,7 @@ class Get extends Action group: 'reports', name: 'getReport', description: '/docs/references/advisor/get-report.md', - auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Advisor/Http/Reports/XList.php b/src/Appwrite/Platform/Modules/Advisor/Http/Reports/XList.php index c5debb7f68..1440d09142 100644 --- a/src/Appwrite/Platform/Modules/Advisor/Http/Reports/XList.php +++ b/src/Appwrite/Platform/Modules/Advisor/Http/Reports/XList.php @@ -41,7 +41,7 @@ class XList extends Action group: 'reports', name: 'listReports', description: '/docs/references/advisor/list-reports.md', - auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/tests/unit/Advisor/AuthTest.php b/tests/unit/Advisor/AuthTest.php new file mode 100644 index 0000000000..c2d4a93755 --- /dev/null +++ b/tests/unit/Advisor/AuthTest.php @@ -0,0 +1,37 @@ +getLabels()['sdk']; + + $this->assertSame([AuthType::ADMIN, AuthType::KEY], $method->getAuth()); + } + + public static function advisorActionsProvider(): array + { + return [ + 'get report' => [new GetReport()], + 'list reports' => [new ListReports()], + 'delete report' => [new DeleteReport()], + 'get insight' => [new GetInsight()], + 'list insights' => [new ListInsights()], + ]; + } +}