use rest api in cli

This commit is contained in:
2024-10-11 15:44:54 +02:00
parent 309250b6a1
commit 3ff98358c0
2 changed files with 3 additions and 2 deletions

View File

@@ -7,7 +7,7 @@
module Main where module Main where
import API.Collection qualified import ACMS.API.REST.Collection qualified
import Control.Applicative ((<**>)) import Control.Applicative ((<**>))
import Data.Aeson qualified as J import Data.Aeson qualified as J
import Data.ByteString.Lazy qualified as LB import Data.ByteString.Lazy qualified as LB
@@ -83,6 +83,6 @@ main = do
} }
} -> } ->
print print
=<< API.Collection.insert collectionName fileName =<< ACMS.API.REST.Collection.create collectionName fileName
=<< J.throwDecode =<< J.throwDecode
=<< LB.getContents =<< LB.getContents

View File

@@ -16,6 +16,7 @@ executable cli
ghc-options: -Wall ghc-options: -Wall
build-depends: build-depends:
aeson, aeson,
backend,
base, base,
bytestring, bytestring,
filepath, filepath,