Fixes: Simplify PageController, fix config API, update deployment package (2026-02-17)
- Removed service dependencies from PageController constructor - Fixed AdminController config API signatures - Cleaned up Application.php resource loading - Updated template with proper resource includes - Simplified routes.php - Reduced analyticshub.zip from 50KB to 27KB - Status: Fixed and ready for redeployment
This commit is contained in:
@@ -31,11 +31,11 @@ class AdminController {
|
||||
* Load configuration
|
||||
*/
|
||||
public function load(): JSONResponse {
|
||||
$clientId = $this->config->getAppValue('google_client_id', 'analyticshub', '');
|
||||
$apiKey = $this->config->getAppValue('anthropic_api_key', 'analyticshub', '');
|
||||
$llmEndpoint = $this->config->getAppValue('llm_api_endpoint', 'analyticshub', '');
|
||||
$llmModel = $this->config->getAppValue('llm_model', 'analyticshub', '');
|
||||
$refreshToken = $this->config->getAppValue('google_refresh_token', 'analyticshub', '');
|
||||
$clientId = $this->config->getAppValue('analyticshub', 'google_client_id', '');
|
||||
$apiKey = $this->config->getAppValue('analyticshub', 'anthropic_api_key', '');
|
||||
$llmEndpoint = $this->config->getAppValue('analyticshub', 'llm_api_endpoint', '');
|
||||
$llmModel = $this->config->getAppValue('analyticshub', 'llm_model', '');
|
||||
$refreshToken = $this->config->getAppValue('analyticshub', 'google_refresh_token', '');
|
||||
|
||||
// Check if configured
|
||||
$isConfigured = !empty($clientId) && !empty($apiKey) && !empty($refreshToken);
|
||||
@@ -92,22 +92,22 @@ class AdminController {
|
||||
}
|
||||
|
||||
// Save configuration
|
||||
$this->config->setAppValue('google_client_id', 'analyticshub', $clientId);
|
||||
$this->config->setAppValue('google_client_secret', 'analyticshub', $clientSecret);
|
||||
$this->config->setAppValue('analyticshub', 'google_client_id', $clientId);
|
||||
$this->config->setAppValue('analyticshub', 'google_client_secret', $clientSecret);
|
||||
|
||||
if (!empty($refreshToken)) {
|
||||
$this->config->setAppValue('google_refresh_token', 'analyticshub', $refreshToken);
|
||||
$this->config->setAppValue('analyticshub', 'google_refresh_token', $refreshToken);
|
||||
}
|
||||
|
||||
if (!empty($llmEndpoint)) {
|
||||
$this->config->setAppValue('llm_api_endpoint', 'analyticshub', $llmEndpoint);
|
||||
$this->config->setAppValue('analyticshub', 'llm_api_endpoint', $llmEndpoint);
|
||||
}
|
||||
|
||||
if (!empty($llmModel)) {
|
||||
$this->config->setAppValue('llm_model', 'analyticshub', $llmModel);
|
||||
$this->config->setAppValue('analyticshub', 'llm_model', $llmModel);
|
||||
}
|
||||
|
||||
$this->config->setAppValue('anthropic_api_key', 'analyticshub', $apiKey);
|
||||
$this->config->setAppValue('analyticshub', 'anthropic_api_key', $apiKey);
|
||||
|
||||
// Check if fully configured
|
||||
$isConfigured = !empty($clientId) && !empty($clientSecret) && !empty($apiKey) && !empty($refreshToken);
|
||||
|
||||
Reference in New Issue
Block a user