|
|
@ -123,11 +123,9 @@ function declare({ uuid, name, description, tags, img, group_key, host, price_pe |
|
|
|
exports.declare = declare; |
|
|
|
function declare_bot({ uuid, name, description, tags, img, price_per_use, owner_pubkey, unlisted, deleted }) { |
|
|
|
return __awaiter(this, void 0, void 0, function* () { |
|
|
|
console.log('=> declare_bot', { uuid, name, description, tags, img, price_per_use, owner_pubkey, unlisted, deleted }); |
|
|
|
const host = getHost(); |
|
|
|
console.log('=> https://' + host + '/bots'); |
|
|
|
try { |
|
|
|
const r = yield node_fetch_1.default('https://' + host + '/bots', { |
|
|
|
yield node_fetch_1.default('https://' + host + '/bots', { |
|
|
|
method: 'POST', |
|
|
|
body: JSON.stringify({ |
|
|
|
uuid, owner_pubkey, |
|
|
@ -138,8 +136,8 @@ function declare_bot({ uuid, name, description, tags, img, price_per_use, owner_ |
|
|
|
}), |
|
|
|
headers: { 'Content-Type': 'application/json' } |
|
|
|
}); |
|
|
|
const j = yield r.json(); |
|
|
|
console.log('=> j', j); |
|
|
|
// const j = await r.json()
|
|
|
|
// console.log('=> j',j)
|
|
|
|
} |
|
|
|
catch (e) { |
|
|
|
console.log('[tribes] unauthorized to declare'); |
|
|
|