Added pages to view the list of potential jobs

TODO: add ability to run a job & view queued jobs
This commit is contained in:
2023-05-31 16:23:18 +01:00
parent 9b2da13e3a
commit 119e932154
9 changed files with 353 additions and 1 deletions

22
routes/jobs.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
/*
* AVSDev UF Worker (https://avsdev.uk)
*
* @link https://git.avsdev.uk/avsdev/sprinkle-worker
* @license https://git.avsdev.uk/avsdev/sprinkle-worker/blob/master/LICENSE.md (LGPL-3.0 License)
*/
use UserFrosting\Sprinkle\Core\Util\NoCache;
/*
* Routes for available worker job listing.
*/
$app->group('/jobs', function () {
$this->get('', 'UserFrosting\Sprinkle\Worker\Controller\JobController:pageList')
->setName('uri_permissions');
})->add('authGuard')->add(new NoCache());
$app->group('/api/jobs', function () {
$this->get('', 'UserFrosting\Sprinkle\Worker\Controller\JobController:getList');
})->add('authGuard')->add(new NoCache());