Skip to content

Commit

Permalink
chore: simple test case to check limits (#2550)
Browse files Browse the repository at this point in the history
This updates `/repl` endpoint to simply upload CARs so we can test it's
limits, if works out we can rewire primary endpoint.
  • Loading branch information
Gozala authored Apr 2, 2024
1 parent 5d94ec5 commit 6a50a70
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions packages/api/src/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,11 @@ export const repl = async (event, ctx) => {
throw new HTTPError('empty payload', 400)
}

const result = await w3up.uploadCAR(blob, {
onShardStored: ({ cid }) => {
console.log(`SHARD ${cid}`)
},
// @ts-expect-error TODO adjust upstream type
pieceHasher: null,
})
const car = await w3up.capability.store.add(blob)

console.log('UPLOADED CAR')

return new JSONResponse({ ok: true, value: result })
return new JSONResponse({ ok: true, value: car })
} else {
throw new HTTPError(`No w3up client`, 500)
}
Expand Down

0 comments on commit 6a50a70

Please sign in to comment.