diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-10-11 23:30:56 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-10-11 23:30:56 +0200 |
commit | 80a6150610182eefa0deb1f0932d3b780456ca09 (patch) | |
tree | 4471a8ffecfc527d6b9c2a5c48e445e7a4d6a74f /backend/app/Route.hs | |
parent | 2e0cf98254976e443ea7f693961fc105ed6cf563 (diff) |
use backend REST library for frontend
Diffstat (limited to 'backend/app/Route.hs')
-rw-r--r-- | backend/app/Route.hs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/backend/app/Route.hs b/backend/app/Route.hs index 61fa699..59c5342 100644 --- a/backend/app/Route.hs +++ b/backend/app/Route.hs @@ -3,19 +3,11 @@ module Route (Route (..), parser) where import Data.Attoparsec.Char8 qualified as P data Route - = SchemaJson String - | Query - | SchemaVersion - | Collections + = Query deriving (Show) parser :: P.Parser Route parser = - ( P.choice - [ pure Collections <* P.string "/collections", - pure SchemaVersion <* P.string "/schemaVersion", - SchemaJson <$> (P.string "/" *> P.manyTill P.anyChar (P.string ".schema.json")), - pure Query <* P.string "/" - ] - ) + pure Query + <* P.string "/" <* P.endOfInput |