diff --git a/js/kit.js b/js/kit.js index 9c4e877e4..6e2ca2f4c 100644 --- a/js/kit.js +++ b/js/kit.js @@ -2260,7 +2260,7 @@ brtOffer = function(){ self.images = []; self.geohash = ''; self.price = 0; - self.published = 1; + self.published = 'published'; self.validation = function(){ if(!self.address) return 'address'; diff --git a/js/lib/apps/index.js b/js/lib/apps/index.js index c1dd129ba..1914b6693 100644 --- a/js/lib/apps/index.js +++ b/js/lib/apps/index.js @@ -721,6 +721,18 @@ var BastyonApps = function(app){ } }, + removeOffer : { + permissions : ['account'], + authorization : true, + action : function({data, application}){ + var remove = new Remove(); + + remove.import({ txidEdit: data.hash }); + + return makeAction(remove, application, true); + } + }, + comment : { permissions : ['account'], authorization : true, diff --git a/js/lib/apps/sdk.js b/js/lib/apps/sdk.js index 8f7d6ccdd..57649eda0 100644 --- a/js/lib/apps/sdk.js +++ b/js/lib/apps/sdk.js @@ -280,6 +280,10 @@ var BastyonSdk = function(){ return action('barteron.offer', data) }, + removeOffer : function(data){ + return action('barteron.removeOffer', data) + }, + comment : function(data){ return action('barteron.comment', data) },