Open hunfwj opened 1 year ago
if (body) {
const rid = JSON.parse(body)['requestId'];
console.log(body, rid);
// 5. Query pinning status through pinning service
while (true) {
const {body: pinningStat} = await got(
ipfsPinningService + /pins/${rid}
,
{
headers: {
authorization: 'Bearer ' + authHeader
}
}
);
console.log(pinningStat); // After success, you can query the cid on Crust
await timeout(1000);
}
} else { console.log(body); throw new Error('Crust pin failed, please try again.'); }
I want to use goland to write service.