Initial commit

This commit is contained in:
2026-07-05 21:52:31 +02:00
commit 93259f5b6d
35 changed files with 2389 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace OCA\MoneyPlanner\Controller;
use Closure;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCA\MoneyPlanner\Service\NotFoundException;
trait Errors {
protected function handleNotFound (Closure $callback) {
try {
return new DataResponse($callback());
} catch(NotFoundException $e) {
$message = ['message' => $e->getMessage()];
return new DataResponse($message, Http::STATUS_NOT_FOUND);
}
}
}
?>