From f59cd4349c974c8ab7907b4852f5dc86ce4daeed Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Sat, 12 Oct 2024 16:29:05 +0200 Subject: add doc tests --- backend/lib/ACMS/API/REST/Collection.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backend/lib/ACMS/API/REST/Collection.hs') diff --git a/backend/lib/ACMS/API/REST/Collection.hs b/backend/lib/ACMS/API/REST/Collection.hs index 9f7cafa..7be3269 100644 --- a/backend/lib/ACMS/API/REST/Collection.hs +++ b/backend/lib/ACMS/API/REST/Collection.hs @@ -16,6 +16,7 @@ import Data.Aeson qualified as A import Data.Function ((&)) import Miso.String (MisoString) import Text.Printf (printf) +import Debug.Trace list :: (APIMonad m) => MisoString -> m [A.Object] list c = @@ -29,7 +30,7 @@ read c i = & fetch >>= A.throwDecode -update :: (APIMonad m) => MisoString -> MisoString -> A.Object -> m () +update :: (APIMonad m) => MisoString -> MisoString -> A.Object -> m A.Object update c i o = restRequest (printf "/collection/%s/%s" c i) & setRequestMethod "PUT" -- cgit v1.2.3