added claim_address and change_address to publish'

This commit is contained in:
bill bittner 2017-06-12 12:07:01 -07:00
parent daa7555752
commit 5569e53e2d
3 changed files with 6 additions and 8 deletions

View file

@ -68,7 +68,7 @@ function findAllClaims(name, resolve, reject){
module.exports = {
publishClaim: function(publishParams){
console.log(publishParams);
console.log("publish params:>", publishParams);
var deferred = new Promise(function(resolve, reject){
axios.post('http://localhost:5279/lbryapi', {
"method": "publish",
@ -89,9 +89,7 @@ module.exports = {
},
getClaimBasedOnNameOnly: function(claimName){
// 1. create a promise
var deferred = new Promise(function (resolve, reject){
// 2. code to resolve or reject the promise
// make a call to the daemon to get the claims list
axios.post('http://localhost:5279/lbryapi', {
"method": "claim_list",
@ -129,9 +127,7 @@ module.exports = {
reject(error);
});
});
// 3. return the promise
return deferred;
},
getClaimBasedOnUri: function(uri){

View file

@ -15,7 +15,7 @@ function createPublishParams(name, filepath, license, nsfw) {
var publishParams = {
"name": name,
"file_path": filepath,
"bid": 0.1,
"bid": 0.01,
"metadata": {
"description": name + " published via spee.ch",
"title": name,
@ -23,7 +23,9 @@ function createPublishParams(name, filepath, license, nsfw) {
"language": "en",
"license": license,
"nsfw": (nsfw.toLowerCase() === "true")
}
},
"claim_address": "", // fill in wallet address
"change_address": "" // fill in wallet address; requires daemon 0.12.2rc1 or above
};
return publishParams;
}

View file

@ -19,7 +19,7 @@ module.exports = function(app) {
console.log("saved " + event.file.name);
if (event.file.success){
socket.emit("publish-status", "file upload successfully completed");
socketHelpers.publish(event.file.meta.name, event.file.pathName, event.file.meta.license,event.file.meta.nsfw, socket)
socketHelpers.publish(event.file.meta.name, event.file.pathName, event.file.meta.license, event.file.meta.nsfw, socket)
} else {
socket.emit("publish-failure", "file uploaded, but with errors")
};