This commit is contained in:
Patrick Niebeling
2025-03-12 11:11:19 +01:00
parent 4e4ae2b372
commit 7f683fcec1
16 changed files with 211 additions and 154 deletions

22
appinfo/application.php Normal file
View File

@ -0,0 +1,22 @@
<?php
namespace OCA\Deckflow\AppInfo;
use OCP\AppFramework\App;
use OCA\Deckflow\Controller\SettingsController;
class Application extends App {
public function __construct() {
parent::__construct('deckflow');
}
public function register() {
$this->getContainer()->registerService('SettingsController', function($c) {
return new SettingsController(
$c->query('OCP\IRequest'),
$c->query('OCP\IUserSession'),
$c->query('OCA\Deckflow\Service\WorkflowService')
);
});
}
}

View File

@ -1,9 +0,0 @@
<?php
// lib/cron.php
/** @var \OCP\IContainer $container */
$container = require __DIR__ . '/../lib/container.php';
$job = $container->query('OCA\Deckflow\Cron\MoveOverdueCardsJob');
// Führe den Cronjob aus
$job->execute();

View File

@ -1,14 +0,0 @@
<?xml version="1.0"?>
<ocl:information xmlns:ocl="http://www.nextcloud.org/ns">
<id>deckflow</id>
<name>Deckflow</name>
<summary>Automatisiere Deck-Karten mit Cronjobs und Workflows</summary>
<description>Diese App automatisiert die Bewegung von Karten basierend auf Workflows und Überprüfungen von überfälligen Karten.</description>
<version>0.1.0</version>
<namespace>deckflow</namespace>
<dependencies>
<nextcloud>21</nextcloud>
<app>workflow</app>
<app>deck</app>
</dependencies>
</ocl:information>

20
appinfo/routes.php Normal file
View File

@ -0,0 +1,20 @@
<?php
use OCP\AppFramework\Router;
use OCP\IContainer;
$container->registerService('SettingsController', function(IContainer $c) {
return new \OCA\Deckflow\Controller\SettingsController(
$c->query('OCP\IRequest'),
$c->query('OCP\IUserSession'),
$c->query('OCA\Deckflow\Service\WorkflowService')
);
});
// Hier wird die Route für den Webhook definiert
$container->registerService('WebhookController', function(IContainer $c) {
return new \OCA\Deckflow\Controller\WebhookController(
$c->query('OCP\IRequest'),
$c->query('OCA\Deckflow\Service\WorkflowService')
);
});