Browse Source

parns

push-params
Evan Feenstra 4 years ago
parent
commit
3b6c863c38
  1. 2
      api/controllers/bots.ts
  2. 2
      dist/api/controllers/bots.js
  3. 2
      dist/api/controllers/bots.js.map

2
api/controllers/bots.ts

@ -72,7 +72,7 @@ export async function installBot(chat, bot_json) {
console.log("=> chat to install bot into", chat)
const owner = await models.Contact.findOne({ where: { isOwner: true } })
const isTribeOwner = owner && owner.publicKey && owner.publicKey === chat && chat.ownerPubkey
const isTribeOwner = (owner && owner.publicKey) === (chat && chat.ownerPubkey)
if(!isTribeOwner) return console.log('=> only tribe owner can install bots')
const {uuid,owner_pubkey,unique_name,price_per_use} = bot_json

2
dist/api/controllers/bots.js

@ -82,7 +82,7 @@ function installBot(chat, bot_json) {
return console.log('no chat id in installBot');
console.log("=> chat to install bot into", chat);
const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } });
const isTribeOwner = owner && owner.publicKey && owner.publicKey === chat && chat.ownerPubkey;
const isTribeOwner = (owner && owner.publicKey) === (chat && chat.ownerPubkey);
if (!isTribeOwner)
return console.log('=> only tribe owner can install bots');
const { uuid, owner_pubkey, unique_name, price_per_use } = bot_json;

2
dist/api/controllers/bots.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save