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 | |
parent | 29d9251b15d56f66d06551e158e992ace1856110 (diff) |
add doc tests
Diffstat (limited to 'cli')
-rw-r--r-- | cli/app/Main.hs | 9 | ||||
-rw-r--r-- | cli/cli.cabal | 2 |
2 files changed, 6 insertions, 5 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 diff --git a/cli/cli.cabal b/cli/cli.cabal index bb98d8b..4a21270 100644 --- a/cli/cli.cabal +++ b/cli/cli.cabal @@ -8,7 +8,7 @@ author: Alexander Foremny build-type: Simple extra-doc-files: CHANGELOG.md -executable cli +executable acms main-is: Main.hs hs-source-dirs: app other-modules: |