Skip to content

Commit

Permalink
Removed deprecated "datum" endpoints in favour of newer "datums" endp…
Browse files Browse the repository at this point in the history
…oint
  • Loading branch information
sourabhxyz committed Nov 27, 2023
1 parent fb8e328 commit f65ed10
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Maestro/API/V1.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Maestro/API/V1/Blocks.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Maestro/Client/V1/Datum.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit f65ed10

Please sign in to comment.