Fix: Rename app folder to match app ID
- Renamed analytics-hub/ → analyticshub/ - App ID in info.xml is 'analyticshub' (no hyphen) - Nextcloud requires folder name to match app ID exactly - Fixes 'Could not download app analyticshub' error during installation Installation: - Upload analyticshub/ folder to /var/www/nextcloud/apps/ - Folder name must match app ID in info.xml
This commit is contained in:
50
analyticshub/lib/App.php
Normal file
50
analyticshub/lib/App.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace OCA\AnalyticsHub;
|
||||
|
||||
use OCP\AppFramework\App;
|
||||
use OCA\AnalyticsHub\Controller\ApiV1Controller;
|
||||
use OCP\AnalyticsHub\Controller\ReportController;
|
||||
use OCP\AnalyticsHub\Service\GoogleAnalyticsService;
|
||||
use OCP\AnalyticsHub\Service\LLMService;
|
||||
use OCP\AnalyticsHub\Service\DataProcessor;
|
||||
|
||||
class App extends App {
|
||||
|
||||
public const APP_NAME = 'analytics_hub';
|
||||
|
||||
public function __construct(array $urlParams = []) {
|
||||
parent::__construct(self::APP_NAME, $urlParams);
|
||||
|
||||
// Register services
|
||||
$this->registerService('GoogleAnalyticsService', function($c) {
|
||||
return new GoogleAnalyticsService($c);
|
||||
});
|
||||
|
||||
$this->registerService('LLMService', function($c) {
|
||||
return new LLMService($c);
|
||||
});
|
||||
|
||||
$this->registerService('DataProcessor', function($c) {
|
||||
return new DataProcessor($c);
|
||||
});
|
||||
|
||||
// Register controllers
|
||||
$this->registerService('ApiV1Controller', function($c) {
|
||||
return new ApiV1Controller($c);
|
||||
});
|
||||
|
||||
$this->registerService('ReportController', function($c) {
|
||||
return new ReportController($c);
|
||||
});
|
||||
|
||||
$this->registerService('AdminController', function($c) {
|
||||
return new AdminController($c);
|
||||
});
|
||||
}
|
||||
|
||||
public function getContainer() {
|
||||
return $this->getContainer();
|
||||
}
|
||||
Reference in New Issue
Block a user