diff options
author | Kierán Meinhardt <kmein@posteo.de> | 2024-10-11 16:27:57 +0200 |
---|---|---|
committer | Kierán Meinhardt <kmein@posteo.de> | 2024-10-11 16:27:57 +0200 |
commit | 4e2bca263be212f5795b845a68cf218ff237d8ab (patch) | |
tree | 5c965480f80f5eb8e6a229b13176c4002cab6a03 /cli | |
parent | 7b90c90e5f6f254b0b108127b899bddae076ae57 (diff) |
remove unused API stub from CLI
Diffstat (limited to 'cli')
-rw-r--r-- | cli/app/API/Collection.hs | 33 | ||||
-rw-r--r-- | cli/cli.cabal | 2 |
2 files changed, 1 insertions, 34 deletions
diff --git a/cli/app/API/Collection.hs b/cli/app/API/Collection.hs deleted file mode 100644 index 89a5845..0000000 --- a/cli/app/API/Collection.hs +++ /dev/null @@ -1,33 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE ViewPatterns #-} - -module API.Collection where - -import Data.Aeson qualified as A -import Data.Aeson.KeyMap qualified as AM -import Data.Text qualified as T -import Process.Shell (Quotable (..), sh) -import Debug.Trace - -insert :: T.Text -> T.Text -> A.Object -> IO T.Text -insert - collectionName - fileName - ( traceShowId -> AM.insert "$fileName" (A.String fileName) -> traceShowId -> - A.Object -> traceShowId -> contents - ) = - {- TODO REST/ CRUD API - [sh| - curl -fsS http://localhost:8081/collections/#{collectionName}/#{filePath} \ - --data #{contents} - \|]-} - [sh| - set -efux - curl -fsS http://localhost:8081 \ - --data "INSERT "'#{contents}'" INTO #{collectionName}" - |] - --- TODO sh -instance Quotable A.Value where - toString = toString . A.encode diff --git a/cli/cli.cabal b/cli/cli.cabal index 69cf4d1..d0ad909 100644 --- a/cli/cli.cabal +++ b/cli/cli.cabal @@ -11,7 +11,7 @@ extra-doc-files: CHANGELOG.md executable cli main-is: Main.hs hs-source-dirs: app - other-modules: API.Collection + other-modules: default-language: GHC2021 ghc-options: -Wall build-depends: |