diff options
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: |