From 3ff98358c038186b39613d0bc9fa70001711c69d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Fri, 11 Oct 2024 15:44:54 +0200 Subject: use rest api in cli --- cli/app/Main.hs | 4 ++-- cli/cli.cabal | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/app/Main.hs b/cli/app/Main.hs index 6006e7c..799af2b 100644 --- a/cli/app/Main.hs +++ b/cli/app/Main.hs @@ -7,7 +7,7 @@ module Main where -import API.Collection qualified +import ACMS.API.REST.Collection qualified import Control.Applicative ((<**>)) import Data.Aeson qualified as J import Data.ByteString.Lazy qualified as LB @@ -83,6 +83,6 @@ main = do } } -> print - =<< API.Collection.insert collectionName fileName + =<< ACMS.API.REST.Collection.create collectionName fileName =<< J.throwDecode =<< LB.getContents diff --git a/cli/cli.cabal b/cli/cli.cabal index 5065732..69cf4d1 100644 --- a/cli/cli.cabal +++ b/cli/cli.cabal @@ -16,6 +16,7 @@ executable cli ghc-options: -Wall build-depends: aeson, + backend, base, bytestring, filepath, -- cgit v1.2.3