Skip to content

Commit

Permalink
Removing debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
2-towns committed Oct 25, 2024
1 parent 3aedb7f commit 35a9100
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions codex/rest/api.nim
Original file line number Diff line number Diff line change
Expand Up @@ -590,21 +590,14 @@ proc initPurchasingApi(node: CodexNodeRef, router: var RestRouter) =
## tolerance - allowed number of nodes that can be lost before content is lost
## colateral - requested collateral from hosts when they fill slot
try:
echo "without contracts"
without contracts =? node.contracts.client:
return RestApiResponse.error(Http503, "Persistence is not enabled", headers = headers)

echo "without cid"

without cid =? cid.tryGet.catch, error:
return RestApiResponse.error(Http400, error.msg, headers = headers)

echo "body"

let body = await request.getBody()

echo "without params"

without params =? StorageRequestParams.fromJson(body), error:
return RestApiResponse.error(Http400, error.msg, headers = headers)

Expand All @@ -631,8 +624,6 @@ proc initPurchasingApi(node: CodexNodeRef, router: var RestRouter) =
if expiry <= 0 or expiry >= params.duration:
return RestApiResponse.error(Http400, "Expiry needs value bigger then zero and smaller then the request's duration", headers = headers)

echo "request storage"

without purchaseId =? await node.requestStorage(
cid,
params.duration,
Expand Down

0 comments on commit 35a9100

Please sign in to comment.