- WIP on adding of HttpFactory and work on authorization from Ulmus/User too
This commit is contained in:
1 parent
1241e188e9
commit
16cd95abe2
9 files changed
+47
-55
No files matched your search
@@ -2,19 +2,17 @@
|
||||
|
||||
use function DI\autowire, DI\create, DI\get;
|
||||
|
||||
use Laminas\Diactoros\Response\HtmlResponse;
|
||||
|
||||
use Cronard\CronardMiddleware,
|
||||
Notes\Cronard\TaskFetcher;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
use Lean\Lean;
|
||||
use Lean\{ Factory, Lean };
|
||||
|
||||
return [
|
||||
CronardMiddleware::class => function($c) {
|
||||
$cronardMiddleware = new CronardMiddleware($c, getenv('CRON_KEY'), function() : ResponseInterface {
|
||||
return new HtmlResponse(sprintf("%s - cron task begin...", date('Y-m-d H:i:s')));
|
||||
return Factory\HttpFactory::createHtmlResponse(sprintf("%s - cron task begin...", date('Y-m-d H:i:s')));
|
||||
}, []);
|
||||
|
||||
return $cronardMiddleware->fromFile(getenv("META_PATH")."/crontab.php")->fromAnnotations($c->get(TaskFetcher::class));
|
||||
|
||||
Reference in new issue
Block a user