From 4e2bca263be212f5795b845a68cf218ff237d8ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Fri, 11 Oct 2024 16:27:57 +0200 Subject: remove unused API stub from CLI --- cli/app/API/Collection.hs | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 cli/app/API/Collection.hs (limited to 'cli/app') 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 -- cgit v1.2.3