diff --git a/api/controllers/actions.ts b/api/controllers/actions.ts index 45bcfe4..3520479 100644 --- a/api/controllers/actions.ts +++ b/api/controllers/actions.ts @@ -25,8 +25,29 @@ export const getBots = async (req, res) => { } } +export const getBotsForTribe = async (req, res) => { + const chat_id = req.params.chat_id + const chatId = parseInt(chat_id) + if(!chatId) return failure(res,'no chat id') + try { + const bots = await models.Bot.findAll({where:{chatId}}) + success(res, { + bots: bots.map(b=> jsonUtils.botToJson(b)) + }) + } catch(e) { + failure(res,'no bots') + } +} + export const createBot = async (req, res) => { const { chat_id, name, } = req.body + const chatId = parseInt(chat_id) + const chat = await models.Chat.findOne({where:{id:chatId}}) + if(!chat) return failure(res,'no chat') + + const owner = await models.Contact.findOne({where: {isOwner:true}}) + const isTribeOwner = owner.publicKey===chat.ownerPubkey + if(!isTribeOwner) return failure(res, 'not tribe owner') const newBot = { id: crypto.randomBytes(8).toString('hex').toUpperCase(), diff --git a/api/controllers/index.ts b/api/controllers/index.ts index bddfacd..60df625 100644 --- a/api/controllers/index.ts +++ b/api/controllers/index.ts @@ -95,6 +95,7 @@ export async function set(app) { app.post('/action', actions.processAction) app.get('/bots', actions.getBots) + app.get('/bots/:chat_id',actions.getBotsForTribe) app.post('/bot', actions.createBot) app.delete('/bot/:id', actions.deleteBot) diff --git a/dist/api/controllers/actions.js b/dist/api/controllers/actions.js index 74c2af9..3f143cc 100644 --- a/dist/api/controllers/actions.js +++ b/dist/api/controllers/actions.js @@ -33,8 +33,31 @@ exports.getBots = (req, res) => __awaiter(void 0, void 0, void 0, function* () { res_1.failure(res, 'no bots'); } }); +exports.getBotsForTribe = (req, res) => __awaiter(void 0, void 0, void 0, function* () { + const chat_id = req.params.chat_id; + const chatId = parseInt(chat_id); + if (!chatId) + return res_1.failure(res, 'no chat id'); + try { + const bots = yield models_1.models.Bot.findAll({ where: { chatId } }); + res_1.success(res, { + bots: bots.map(b => jsonUtils.botToJson(b)) + }); + } + catch (e) { + res_1.failure(res, 'no bots'); + } +}); exports.createBot = (req, res) => __awaiter(void 0, void 0, void 0, function* () { const { chat_id, name, } = req.body; + const chatId = parseInt(chat_id); + const chat = yield models_1.models.Chat.findOne({ where: { id: chatId } }); + if (!chat) + return res_1.failure(res, 'no chat'); + const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } }); + const isTribeOwner = owner.publicKey === chat.ownerPubkey; + if (!isTribeOwner) + return res_1.failure(res, 'not tribe owner'); const newBot = { id: crypto.randomBytes(8).toString('hex').toUpperCase(), chatId: chat_id, diff --git a/dist/api/controllers/actions.js.map b/dist/api/controllers/actions.js.map index 39cdd23..75ce4fd 100644 --- a/dist/api/controllers/actions.js.map +++ b/dist/api/controllers/actions.js.map @@ -1 +1 @@ -{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../api/controllers/actions.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAA+C;AAC/C,6BAA4B;AAC5B,sCAAqC;AACrC,sCAAkC;AAClC,oCAAmC;AACnC,qCAAoC;AACpC,iCAAgC;AAChC,2CAA0C;AAE1C;;;EAGE;AAEF,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC,CAAA;AAEjE,QAAA,OAAO,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IACtC,IAAI;QACA,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,GAAG,CAAC,OAAO,EAAE,CAAA;QACvC,aAAO,CAAC,GAAG,EAAE;YACT,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;SAC7C,CAAC,CAAA;KACL;IAAC,OAAM,CAAC,EAAE;QACP,aAAO,CAAC,GAAG,EAAC,SAAS,CAAC,CAAA;KACzB;AACL,CAAC,CAAA,CAAA;AAEY,QAAA,SAAS,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IACxC,MAAM,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AAO;gBACrC,OAAO,EAAE,GAAG,EAAE,CAAC,aAAO,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gBAC9C,OAAO,EAAE,GAAG,EAAE,CAAC,aAAO,CAAC,GAAG,EAAE,QAAQ,CAAC;aACxC,CAAC,CAAA;SACL;aAAM;YACH,OAAO,aAAO,CAAC,GAAG,EAAE,WAAW,CAAC,CAAA;SACnC;IACL,CAAC;CAAA;AAhFD,sCAgFC"} \ No newline at end of file +{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../api/controllers/actions.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAA+C;AAC/C,6BAA4B;AAC5B,sCAAqC;AACrC,sCAAkC;AAClC,oCAAmC;AACnC,qCAAoC;AACpC,iCAAgC;AAChC,2CAA0C;AAE1C;;;EAGE;AAEF,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC,CAAA;AAEjE,QAAA,OAAO,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IACtC,IAAI;QACA,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,GAAG,CAAC,OAAO,EAAE,CAAA;QACvC,aAAO,CAAC,GAAG,EAAE;YACT,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;SAC7C,CAAC,CAAA;KACL;IAAC,OAAM,CAAC,EAAE;QACP,aAAO,CAAC,GAAG,EAAC,SAAS,CAAC,CAAA;KACzB;AACL,CAAC,CAAA,CAAA;AAEY,QAAA,eAAe,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IAC9C,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAA;IAClC,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAA;IAChC,IAAG,CAAC,MAAM;QAA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,QAAQ,CAAC;aACxC,CAAC,CAAA;SACL;aAAM;YACH,OAAO,aAAO,CAAC,GAAG,EAAE,WAAW,CAAC,CAAA;SACnC;IACL,CAAC;CAAA;AAhFD,sCAgFC"} \ No newline at end of file diff --git a/dist/api/controllers/index.js b/dist/api/controllers/index.js index a2b462b..0bf5c4a 100644 --- a/dist/api/controllers/index.js +++ b/dist/api/controllers/index.js @@ -92,6 +92,7 @@ function set(app) { app.get('/info', details.getNodeInfo); app.post('/action', actions.processAction); app.get('/bots', actions.getBots); + app.get('/bots/:chat_id', actions.getBotsForTribe); app.post('/bot', actions.createBot); app.delete('/bot/:id', actions.deleteBot); app.get('/version', function (req, res) { diff --git a/dist/api/controllers/index.js.map b/dist/api/controllers/index.js.map index 6c72731..fecdbc8 100644 --- a/dist/api/controllers/index.js.map +++ b/dist/api/controllers/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,iCAAgC;AAChC,2CAA0C;AAC1C,qCAAoC;AACpC,uCAAsC;AACtC,qCAAoC;AACpC,uCAAsC;AACtC,iCAAgC;AAChC,uCAAsC;AACtC,sCAAqC;AACrC,gDAA+C;AAC/C,qCAAoC;AACpC,iDAAgD;AAChD,qCAAoC;AACpC,8CAAyC;AACzC,6BAA4B;AAC5B,0CAAyC;AAGzC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,OAAO,CAAC,GAAG,CAAC,SAAS,EAAC,GAAG,CAAC,CAAA;AAC1B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAE7E,SAAsB,GAAG,CAAC,GAAG;;QAE5B,IAAG,eAAM,IAAI,eAAM,CAAC,YAAY,EAAC;YAChC,YAAY,CAAC,kBAAkB,EAAE,CAAA;SACjC;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