diff --git a/frontend_tests/node_tests/bot_data.js b/frontend_tests/node_tests/bot_data.js index c053f3fdc8..d508e9816a 100644 --- a/frontend_tests/node_tests/bot_data.js +++ b/frontend_tests/node_tests/bot_data.js @@ -104,7 +104,7 @@ run_test('test_basics', () => { bot = bot_data.get(43); assert.equal('Bot 1', bot.full_name); assert(bot.is_active); - bot_data.delete(43); + bot_data.del(43); bot = bot_data.get(43); assert.equal(bot, undefined); }()); diff --git a/frontend_tests/node_tests/dispatch.js b/frontend_tests/node_tests/dispatch.js index 005e03f0b2..8d16455565 100644 --- a/frontend_tests/node_tests/dispatch.js +++ b/frontend_tests/node_tests/dispatch.js @@ -1002,7 +1002,7 @@ with_overrides(function (override) { event = event_fixtures.realm_bot__delete; global.with_stub(function (bot_stub) { global.with_stub(function (admin_stub) { - override('bot_data.delete', bot_stub.f); + override('bot_data.del', bot_stub.f); override('settings_users.update_user_data', admin_stub.f); dispatch(event); var args = bot_stub.get_args('bot_id'); diff --git a/static/js/bot_data.js b/static/js/bot_data.js index 4c1c655783..bc2d51a39d 100644 --- a/static/js/bot_data.js +++ b/static/js/bot_data.js @@ -42,7 +42,7 @@ var bot_data = (function () { send_change_event(); }; - exports.delete = function bot_data__delete(bot_id) { + exports.del = function bot_data__del(bot_id) { delete bots[bot_id]; delete services[bot_id]; send_change_event(); diff --git a/static/js/server_events_dispatch.js b/static/js/server_events_dispatch.js index 88f74cc8f6..a3fa46202d 100644 --- a/static/js/server_events_dispatch.js +++ b/static/js/server_events_dispatch.js @@ -198,7 +198,7 @@ exports.dispatch_normal_event = function dispatch_normal_event(event) { event.bot.is_active = false; settings_users.update_user_data(event.bot.user_id, event.bot); } else if (event.op === 'delete') { - bot_data.delete(event.bot.user_id); + bot_data.del(event.bot.user_id); settings_users.update_user_data(event.bot.user_id, event.bot); } else if (event.op === 'update') { if (_.has(event.bot, 'owner_id')) {