turned publish controller into promise
This commit is contained in:
parent
5c95b5c7ec
commit
edeb933f8a
1 changed files with 30 additions and 27 deletions
|
@ -26,6 +26,7 @@ function upsert (Model, values, condition) {
|
|||
|
||||
module.exports = {
|
||||
publish: (publishParams, fileName, fileType) => {
|
||||
const deferred = new Promise((resolve, reject) => {
|
||||
// 1. publish the file
|
||||
lbryApi
|
||||
.publishClaim(publishParams)
|
||||
|
@ -54,5 +55,7 @@ module.exports = {
|
|||
// delete the local file
|
||||
deleteTemporaryFile(publishParams.file_path);
|
||||
});
|
||||
});
|
||||
return deferred;
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue