refactor getNodes into a new NodeController and update refs
This commit is contained in:
parent
acdfc14442
commit
38d06fce43
4 changed files with 40 additions and 27 deletions
|
|
@ -5,7 +5,7 @@ use Psr\Http\Message\ServerRequestInterface as Request;
|
|||
use DI\Bridge\Slim\Bridge;
|
||||
use App\View\ViewController;
|
||||
use App\Text\TextController;
|
||||
use App\Node\NodeRepository;
|
||||
use App\Node\NodeController;
|
||||
|
||||
$container = require __DIR__.'/container.php';
|
||||
$app = Bridge::create($container);
|
||||
|
|
@ -19,7 +19,7 @@ $app->get('/admin/texts/{textId}', [ViewController::class, 'text']);
|
|||
|
||||
$app->get('/api/texts', [TextController::class, 'getTexts']);
|
||||
$app->get('/api/texts/{textId}', [TextController::class, 'getText']);
|
||||
$app->get('/api/texts/{textId}/nodes', [TextController::class, 'getNodes']);
|
||||
$app->get('/api/texts/{textId}/nodes', [NodeController::class, 'getNodes']);
|
||||
$app->post('/api/texts', [TextController::class, 'createText']);
|
||||
|
||||
return $app;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue