diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-10-12 16:29:05 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-10-12 17:10:53 +0200 |
commit | f59cd4349c974c8ab7907b4852f5dc86ce4daeed (patch) | |
tree | 7eaed9115b8ca5ae46792bbf4471bf007480d174 /cli/app/Main.hs | |
parent | 29d9251b15d56f66d06551e158e992ace1856110 (diff) |
add doc tests
Diffstat (limited to 'cli/app/Main.hs')
-rw-r--r-- | cli/app/Main.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cli/app/Main.hs b/cli/app/Main.hs index eaabd0a..ef7a8ad 100644 --- a/cli/app/Main.hs +++ b/cli/app/Main.hs @@ -18,6 +18,7 @@ import Options.Applicative qualified as O import Text.ParserCombinators.ReadP qualified as R import Text.ParserCombinators.ReadPrec qualified as R import Text.Read (Read (..)) +import Debug.Trace data Args = Args { cmd :: Cmd @@ -96,18 +97,18 @@ main = { cmd = CollectionCmd cmd } -> case cmd of CollectionAdd (Collection cn) -> do - print + LB.putStr . J.encodePretty =<< ACMS.API.REST.Collection.create cn =<< J.throwDecode =<< LB.getContents CollectionView CollectionItem {collection = Collection cn, itemFileName} -> - print + LB.putStr . J.encodePretty =<< ACMS.API.REST.Collection.read cn itemFileName CollectionDelete CollectionItem {collection = Collection cn, itemFileName} -> - print + LB.putStr . J.encodePretty =<< ACMS.API.REST.Collection.delete cn itemFileName CollectionEdit CollectionItem {collection = Collection cn, itemFileName} -> - print + LB.putStr . J.encodePretty =<< ACMS.API.REST.Collection.update cn itemFileName =<< J.throwDecode =<< LB.getContents |