From f65ed10f23da9c20c7ecb359335f3719fd353983 Mon Sep 17 00:00:00 2001 From: sourabhxyz Date: Mon, 27 Nov 2023 13:03:06 +0530 Subject: [PATCH] Removed deprecated "datum" endpoints in favour of newer "datums" endpoint --- src/Maestro/API/V1.hs | 2 +- src/Maestro/API/V1/Blocks.hs | 4 ++-- src/Maestro/Client/V1/Datum.hs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Maestro/API/V1.hs b/src/Maestro/API/V1.hs index b1ddc66..1cd12ee 100644 --- a/src/Maestro/API/V1.hs +++ b/src/Maestro/API/V1.hs @@ -17,7 +17,7 @@ data MaestroApiV1 route = MaestroApiV1 , accounts :: route :- "accounts" :> ToServantApi AccountsAPI , addresses :: route :- "addresses" :> ToServantApi AddressesAPI , blocks :: route :- "blocks" :> ToServantApi BlocksAPI - , datum :: route :- "datum" :> ToServantApi DatumAPI + , datums :: route :- "datums" :> ToServantApi DatumAPI , pools :: route :- "pools" :> ToServantApi PoolsAPI , txManager :: route :- "txmanager" :> ToServantApi TxManagerAPI , transactions :: route :- "transactions" :> ToServantApi TransactionsAPI diff --git a/src/Maestro/API/V1/Blocks.hs b/src/Maestro/API/V1/Blocks.hs index f17f13c..5bf1f18 100644 --- a/src/Maestro/API/V1/Blocks.hs +++ b/src/Maestro/API/V1/Blocks.hs @@ -5,12 +5,12 @@ import Servant.API import Servant.API.Generic data BlocksAPI route = BlocksAPI - { -- | Get details of the specified block by hash + { -- | Get details of the specified block by hash. blockByHash :: route :- Capture "hash_or_height" BlockHash :> Get '[JSON] TimestampedBlockDetails - -- | Get details of the specified block by height + -- | Get details of the specified block by height. , blockByHeight :: route :- Capture "hash_or_height" BlockHeight diff --git a/src/Maestro/Client/V1/Datum.hs b/src/Maestro/Client/V1/Datum.hs index c68c9d9..895b0b0 100644 --- a/src/Maestro/Client/V1/Datum.hs +++ b/src/Maestro/Client/V1/Datum.hs @@ -4,7 +4,7 @@ module Maestro.Client.V1.Datum ( getDatumByHash ) where -import Maestro.API.V1 (datum) +import Maestro.API.V1 (datums) import Maestro.API.V1.Datum import Maestro.Client.Env import Maestro.Client.V1.Core @@ -13,7 +13,7 @@ import Servant.API.Generic import Servant.Client datumClient :: MaestroEnv 'V1 -> DatumAPI (AsClientT IO) -datumClient = fromServant . datum . apiV1Client +datumClient = fromServant . datums . apiV1Client -- | Get information about the datum from it's hash. getDatumByHash :: MaestroEnv 'V1 -> HexStringOf DatumHash -> IO TimestampedDatum