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:
@@ -9,6 +9,7 @@ use OCP\IResponse;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\AppFramework\Http\JSONResponse;
|
||||
use OCA\AnalyticsHub\AppInfo\Application;
|
||||
|
||||
use OCA\AnalyticsHub\Service\GoogleAnalyticsService;
|
||||
use OCA\AnalyticsHub\Service\LLMService;
|
||||
@@ -146,7 +147,7 @@ class ApiV1Controller {
|
||||
$this->validateAgentAccess();
|
||||
|
||||
$status = [
|
||||
'app_name' => AppInfo::APP_NAME,
|
||||
'app_name' => Application::APP_NAME,
|
||||
'version' => AppInfo::getVersion(),
|
||||
'status' => 'operational',
|
||||
'google_analytics' => $this->gaService->isConfigured() ? 'configured' : 'not_configured',
|
||||
|
||||
Reference in New Issue
Block a user