Simply use promise
This commit is contained in:
parent
2f8ca177e9
commit
508b37163e
|
@ -21,13 +21,7 @@ __embarkIPFS.register = function(addr, options) {
|
|||
return new Error('No IPFS connection. Please ensure to call Embark.Names.setProvider()');
|
||||
}
|
||||
|
||||
this._ipfsConnection.name.publish("/ipfs/" + addr, options)
|
||||
.then(res => {
|
||||
return `https://gateway.ipfs.io/ipns/${res.name}`;
|
||||
})
|
||||
.catch((err) => {
|
||||
return new Error('Unexpected Error: ' + err);
|
||||
});
|
||||
return this._ipfsConnection.name.publish("/ipfs/" + addr, options);
|
||||
};
|
||||
|
||||
__embarkIPFS.lookup = function () {
|
||||
|
|
Loading…
Reference in New Issue