Fix: Add proper Application.php and fix DI
- Created appinfo/Application.php (Nextcloud app bootstrap) - Extends OCP\AppFramework\App - Registers proper app ID: analyticshub - Loads CSS and JS files - Removed obsolete lib/App.php file - Updated all AppInfo::APP_NAME references to Application::APP_NAME - AdminController, ApiV1Controller - GoogleAnalyticsService, LLMService - Fixed dependency injection in AdminController - Injected IConfig service properly - Added missing use statements This is the core fix for the app not appearing in Nextcloud. Nextcloud requires appinfo/Application.php to initialize the app.
This commit is contained in:
@@ -32,7 +32,7 @@ class LLMService {
|
||||
* Check if LLM service is configured
|
||||
*/
|
||||
public function isConfigured(): bool {
|
||||
$apiKey = $this->config->getAppValue('anthropic_api_key', AppInfo::APP_NAME);
|
||||
$apiKey = $this->config->getAppValue('anthropic_api_key', Application::APP_NAME);
|
||||
return !empty($apiKey);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class LLMService {
|
||||
$this->logger->info("Generating LLM report for: {$client->getName()}");
|
||||
|
||||
try {
|
||||
$apiKey = $this->config->getAppValue('anthropic_api_key', AppInfo::APP_NAME);
|
||||
$apiKey = $this->config->getAppValue('anthropic_api_key', Application::APP_NAME);
|
||||
|
||||
if (empty($apiKey)) {
|
||||
throw new \Exception('Anthropic API key not configured');
|
||||
|
||||
Reference in New Issue
Block a user