From 10c86197f1f63e222dfc9e937911e35ab500a208 Mon Sep 17 00:00:00 2001 From: Jonathan Tschanter Date: Sat, 22 Jan 2022 21:24:24 +0100 Subject: Adds edit cards and templates to include --- src/Router.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Router.php') diff --git a/src/Router.php b/src/Router.php index aad6122..46e3f4f 100644 --- a/src/Router.php +++ b/src/Router.php @@ -31,12 +31,14 @@ class Router $this->addRoute('GET', '/dashboard', [Home::class, 'dashboard']); // card - $this->addRoute('GET', '/card/list', [Card::class, 'listCards']); + $this->addRoute('GET', '/card', [Card::class, 'listCards']); $this->addRoute('GET', '/card/add', [Card::class, 'addCard']); - $this->addRoute('GET', '/card/{id}', [Card::class, 'displayCard']); + $this->addRoute('GET', '/card/{id}', [Card::class, 'viewCard']); $this->addRoute('GET', '/card/{id}/edit', [Card::class, 'editCard']); + $this->addRoute('GET', '/card/{id}/artwork/{artworkId}', [Card::class, 'viewArtwork']); $this->addRoute('POST', '/card/add', [Card::class, 'add']); $this->addRoute('POST', '/card/{id}/edit', [Card::class, 'edit']); + $this->addRoute('POST', '/card/{id}/vote', [Card::class, 'vote']); $context = new RequestContext(); $context->fromRequest($request); -- cgit v1.2.3