Browse Source

handle rr

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

6
api/controllers/bots.ts

@ -86,7 +86,11 @@ export async function installBot(chat, bot_json) {
}
console.log("installBot INSTALL BOT NOW",chatBot)
const succeeded = await keysendBotInstall(chatBot, chat_uuid)
if(succeeded) models.ChatBot.create(chatBot)
if(succeeded) {
try { // could fail
await models.ChatBot.create(chatBot)
} catch(e){}
}
}
export async function keysendBotInstall(b, chat_uuid:string): Promise<boolean> {

8
dist/api/controllers/bots.js

@ -96,8 +96,12 @@ function installBot(chat, bot_json) {
};
console.log("installBot INSTALL BOT NOW", chatBot);
const succeeded = yield keysendBotInstall(chatBot, chat_uuid);
if (succeeded)
models_1.models.ChatBot.create(chatBot);
if (succeeded) {
try { // could fail
yield models_1.models.ChatBot.create(chatBot);
}
catch (e) { }
}
});
}
exports.installBot = installBot;

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

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