Browse Source

bottest

dependabot/npm_and_yarn/ini-1.3.7
Evan Feenstra 4 years ago
parent
commit
f3d1bb333b
  1. 6
      dist/src/utils/tribeBots.js
  2. 2
      dist/src/utils/tribeBots.js.map
  3. 6
      src/utils/tribeBots.ts

6
dist/src/utils/tribeBots.js

@ -15,7 +15,7 @@ function declare_bot({ uuid, name, description, tags, img, price_per_use, owner_
return __awaiter(this, void 0, void 0, function* () {
const host = tribes_1.getHost();
try {
yield fetch('https://' + host + '/bots', {
const r = yield fetch('https://' + host + '/bots', {
method: 'POST',
body: JSON.stringify({
uuid, owner_pubkey,
@ -26,8 +26,8 @@ function declare_bot({ uuid, name, description, tags, img, price_per_use, owner_
}),
headers: { 'Content-Type': 'application/json' }
});
// const j = await r.json()
// console.log('=> j',j)
const j = yield r.json();
console.log('=> bot created:', j);
}
catch (e) {
console.log('[tribes] unauthorized to declare');

2
dist/src/utils/tribeBots.js.map

@ -1 +1 @@
{"version":3,"file":"tribeBots.js","sourceRoot":"","sources":["../../../src/utils/tribeBots.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAkC;AAClC,qCAAgC;AAEhC,SAAsB,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE;;QACpH,MAAM,IAAI,GAAG,gBAAO,EAAE,CAAA;QACtB,IAAI;YACF,MAAM,KAAK,CAAC,UAAU,GAAG,IAAI,GAAG,OAAO,EAAE;gBACvC,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,IAAI,EAAE,YAAY;oBAClB,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE;oBACvC,aAAa,EAAE,aAAa,IAAI,CAAC;oBACjC,QAAQ,EAAE,QAAQ,IAAI,KAAK;oBAC3B,OAAO,EAAE,OAAO,IAAI,KAA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BACT,OAAO,EAAE,GAAG;gBACZ,KAAK,EAAE,CAAC;gBACR,SAAS,EAAE,EAAE;gBACb,SAAS,EAAE,EAAE;gBACb,WAAW,EAAE,CAAC;gBACd,UAAU,EAAE,KAAK;aAClB,CAAC;KACH,CAAA;AACH,CAAC"}

6
src/utils/tribeBots.ts

@ -4,7 +4,7 @@ import {getHost} from './tribes'
export async function declare_bot({ uuid, name, description, tags, img, price_per_use, owner_pubkey, unlisted, deleted }) {
const host = getHost()
try {
await fetch('https://' + host + '/bots', {
const r = await fetch('https://' + host + '/bots', {
method: 'POST',
body: JSON.stringify({
uuid, owner_pubkey,
@ -15,8 +15,8 @@ export async function declare_bot({ uuid, name, description, tags, img, price_pe
}),
headers: { 'Content-Type': 'application/json' }
})
// const j = await r.json()
// console.log('=> j',j)
const j = await r.json()
console.log('=> bot created:',j)
} catch (e) {
console.log('[tribes] unauthorized to declare')
throw e

Loading…
Cancel
Save