Browse Source

fix bot declare

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

3
dist/src/utils/tribeBots.js

@ -11,11 +11,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
Object.defineProperty(exports, "__esModule", { value: true });
const models_1 = require("../models");
const tribes_1 = require("./tribes");
const node_fetch_1 = require("node-fetch");
function declare_bot({ uuid, name, description, tags, img, price_per_use, owner_pubkey, unlisted, deleted }) {
return __awaiter(this, void 0, void 0, function* () {
const host = tribes_1.getHost();
try {
const r = yield fetch('https://' + host + '/bots', {
const r = yield node_fetch_1.default('https://' + host + '/bots', {
method: 'POST',
body: JSON.stringify({
uuid, owner_pubkey,

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,CAAC,GAAG,MAAM,KAAK,CAAC,UAAU,GAAG,IAAI,GAAG,OAAO,EAAE;gBACjD,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,K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H,CAAC;AAED,SAAS,WAAW;IAClB,OAAgB;QACd,MAAM,EAAE,UAAU;QAClB,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,CAAC;gBACT,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"}

1
src/utils/tribeBots.ts

@ -1,5 +1,6 @@
import { models } from '../models'
import {getHost} from './tribes'
import fetch from 'node-fetch'
export async function declare_bot({ uuid, name, description, tags, img, price_per_use, owner_pubkey, unlisted, deleted }) {
const host = getHost()

Loading…
Cancel
Save