- Added an HttpFactory and beginning the removal of old annotations from Notes

This commit is contained in:
mcndave committed 2023-11-03 16:28:31 +00:00
1 parent 7e92391113
commit 08c27e38b0
10 files changed
+143 -52

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
<?php
use Lean\Factory\HttpFactory;
use \Ulmus\User\Middleware\AuthorizeMiddleware;
use function DI\{get, autowire, create};
return [
AuthorizeMiddleware::class => create(AuthorizeMiddleware::class)->constructor(get('authorize.error')),
'authorize.error' => function($c) {
return HttpFactory::createJsonResponse([
'api.error' => "Authorization failed",
'api.datetime' => ( new \DateTime )->format(\DateTime::ATOM),
]);
},
];