diff --git a/src/Chainweb/Payload/RestAPI/Server.hs b/src/Chainweb/Payload/RestAPI/Server.hs index cb92eed26e..2949b73bb4 100644 --- a/src/Chainweb/Payload/RestAPI/Server.hs +++ b/src/Chainweb/Payload/RestAPI/Server.hs @@ -78,7 +78,7 @@ payloadHandler db k mh = liftIO (lookupPayloadDataWithHeight db mh k) >>= \case [ "reason" .= ("key not found" :: String) , "key" .= k ] - Just e -> return e + Just e -> return e -- -------------------------------------------------------------------------- -- -- POST Payload Batch Handler @@ -89,12 +89,8 @@ payloadBatchHandler -> PayloadDb tbl -> BatchBody -> Handler PayloadDataList -payloadBatchHandler batchLimit db ks - = liftIO (PayloadDataList . catMaybes <$> lookupPayloadDataWithHeightBatch db ks') - where - limit = take (int batchLimit) - ks' | WithoutHeights xs <- ks = limit (fmap (Nothing,) xs) - | WithHeights xs <- ks = limit (fmap (over _1 Just) xs) +payloadBatchHandler _batchLimit _db _ks = + throwError (ServerError 404 "" "" []) -- -------------------------------------------------------------------------- -- -- GET Outputs Handler