Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,21 @@
['name' => 'settings#create', 'url' => '/api/settings', 'verb' => 'POST'],
['name' => 'settings#load', 'url' => '/api/settings/load', 'verb' => 'POST'],

// Meeting endpoints — CalDAV VEVENT storage (ADR-002).
['name' => 'meeting#index', 'url' => '/api/meetings', 'verb' => 'GET'],
['name' => 'meeting#create', 'url' => '/api/meetings', 'verb' => 'POST'],
['name' => 'meeting#show', 'url' => '/api/meetings/{id}', 'verb' => 'GET'],
['name' => 'meeting#lifecycle', 'url' => '/api/meetings/{id}/lifecycle', 'verb' => 'POST'],

// Minutes endpoints — specific routes must precede the wildcard catch-all.
// @spec openspec/changes/p2-minutes-and-decisions/tasks.md#task-1
['name' => 'minutes#generateDraft', 'url' => '/api/minutes/{minutesId}/generate-draft', 'verb' => 'POST'],
['name' => 'minutes#transition', 'url' => '/api/minutes/{minutesId}/transition', 'verb' => 'POST'],

// Decision endpoints — server-side publish enforces governance access control.
// @spec openspec/changes/p2-minutes-and-decisions/tasks.md#task-6.2
['name' => 'decision#publish', 'url' => '/api/decisions/{decisionId}/publish', 'verb' => 'POST'],

// Meeting lifecycle transitions.
['name' => 'meeting#lifecycle', 'url' => '/api/meetings/{id}/lifecycle', 'verb' => 'POST'],

// Motion lifecycle and co-signature routes (specific before wildcard).
// Motion lifecycle, co-signature, budget impact, and publish routes.
// Decision publish is on Motion (ADR-001: Decision merged into Motion, Popolo alignment).
['name' => 'motion#transition', 'url' => '/api/motions/{id}/transition', 'verb' => 'POST'],
['name' => 'motion#publish', 'url' => '/api/motions/{id}/publish', 'verb' => 'POST'],
['name' => 'motion#coSignRequest', 'url' => '/api/motions/{id}/co-sign-request', 'verb' => 'POST'],
['name' => 'motion#coSignConfirm', 'url' => '/api/motions/{id}/co-sign-confirm', 'verb' => 'POST'],
['name' => 'motion#budgetImpact', 'url' => '/api/motions/{id}/budget-impact', 'verb' => 'POST'],
Expand Down
433 changes: 219 additions & 214 deletions l10n/en.json

Large diffs are not rendered by default.

421 changes: 213 additions & 208 deletions l10n/nl.json

Large diffs are not rendered by default.

42 changes: 31 additions & 11 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@

use OCA\Decidesk\BackgroundJob\MailReplyHandler;
use OCA\Decidesk\BackgroundJob\OverdueActionItemsJob;
use OCA\Decidesk\Controller\DecisionController;
use OCA\Decidesk\Controller\MeetingController;
use OCA\Decidesk\Controller\MinutesController;
use OCA\Decidesk\Listener\DeepLinkRegistrationListener;
use OCA\Decidesk\Repair\InitializeSettings;
use OCA\Decidesk\Service\CalDavService;
use OCA\Decidesk\Service\MeetingService;
use OCA\Decidesk\Service\MinutesGenerationService;
use OCA\OpenRegister\Event\DeepLinkRegistrationEvent;
use OCP\AppFramework\App;
Expand Down Expand Up @@ -102,23 +104,41 @@
}
);

// Register DecisionController for DI.
// Explicit registration matches the MinutesController pattern and ensures
// reliable resolution in all Nextcloud environments (≥28).
// @spec openspec/changes/p2-minutes-and-decisions/tasks.md#task-6.2.
// Register CalDavService for DI (ADR-002: CalDAV-first storage).
$context->registerService(
DecisionController::class,
static function ($c): DecisionController {
return new DecisionController(
request: $c->get(\OCP\IRequest::class),
container: $c->get(\Psr\Container\ContainerInterface::class),
CalDavService::class,
static function ($c): CalDavService {
return new CalDavService(
calDavBackend: $c->get(\OCA\DAV\CalDAV\CalDavBackend::class),

Check failure on line 112 in lib/AppInfo/Application.php

View workflow job for this annotation

GitHub Actions / quality / PHP Quality (phpstan)

Class OCA\DAV\CalDAV\CalDavBackend not found.

Check failure on line 112 in lib/AppInfo/Application.php

View workflow job for this annotation

GitHub Actions / quality / PHP Quality (psalm)

UndefinedClass

lib/AppInfo/Application.php:112:44: UndefinedClass: Class, interface or enum named OCA\DAV\CalDAV\CalDavBackend does not exist (see https://psalm.dev/019)
userSession: $c->get(\OCP\IUserSession::class),
groupManager: $c->get(\OCP\IGroupManager::class),
logger: $c->get(\Psr\Log\LoggerInterface::class),
);
}
);

// Register MeetingService for DI (uses CalDavService for VEVENT storage).
$context->registerService(
MeetingService::class,
static function ($c): MeetingService {
return new MeetingService(
calDavService: $c->get(CalDavService::class),
logger: $c->get(\Psr\Log\LoggerInterface::class),
);
}
);

// Register MeetingController for DI.
$context->registerService(
MeetingController::class,
static function ($c): MeetingController {
return new MeetingController(
request: $c->get(\OCP\IRequest::class),
meetingService: $c->get(MeetingService::class),
userSession: $c->get(\OCP\IUserSession::class),
);
}
);

// Register OverdueActionItemsJob for DI.
// @spec openspec/changes/p2-minutes-and-decisions/tasks.md#task-2.
$context->registerService(
Expand Down
186 changes: 0 additions & 186 deletions lib/Controller/DecisionController.php

This file was deleted.

Loading
Loading