diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-06-05 10:41:02 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-06-05 10:41:02 +0200 |
commit | a7a4dd01127506dba991cc5f3f39c4a370fff699 (patch) | |
tree | 086c6b306a1bbfb9cd13a727bc2284894991f24d /frontend/app/Route.hs | |
parent | d5f3f2333a4a167054c0a8556dfd8cd87f955595 (diff) |
add edit page
Diffstat (limited to 'frontend/app/Route.hs')
-rw-r--r-- | frontend/app/Route.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/frontend/app/Route.hs b/frontend/app/Route.hs index 36e1462..18a3273 100644 --- a/frontend/app/Route.hs +++ b/frontend/app/Route.hs @@ -12,6 +12,7 @@ import Miso data Route = Home | ListCollection String + | EditValue String String deriving (Show, Eq) instance Default Route where @@ -22,7 +23,10 @@ parseURI uri = either (const def) id $ P.parseOnly ( P.choice - [ ListCollection <$> (P.string "#collection/" *> P.many1 P.anyChar), + [ EditValue + <$> (P.string "#collection/" *> P.manyTill P.anyChar (P.string "/")) + <*> (P.many1 P.anyChar), + ListCollection <$> (P.string "#collection/" *> P.many1 P.anyChar), pure Home ] <* P.endOfInput |