summaryrefslogtreecommitdiff
path: root/src/Router.php
diff options
context:
space:
mode:
authorJonathan Tschanter <jmtw@tutanota.de>2022-01-22 21:24:24 +0100
committerJonathan Tschanter <jmtw@tutanota.de>2022-01-22 21:24:24 +0100
commit10c86197f1f63e222dfc9e937911e35ab500a208 (patch)
tree388ca37920808a66697385c6d69cf6a76e5aaf7b /src/Router.php
parent432bba3dee1d9be25b9626ac45115929a6422961 (diff)
Adds edit cards and templates to include
Diffstat (limited to 'src/Router.php')
-rw-r--r--src/Router.php6
1 files changed, 4 insertions, 2 deletions
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);