Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1164 from Naktibalda/add-delete-method-to-inmemor…
Browse files Browse the repository at this point in the history
…y-store

Add delete method to in-memory store
  • Loading branch information
Ben Brown authored Jan 10, 2018
2 parents 01d6f94 + 6ae2bff commit e8fedf6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/CoreBot.js
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,10 @@ function Botkit(configuration) {
cb('No ID specified');
}
},
delete: function(team_id, cb) {
delete(botkit.memory_store.teams[team_id]);
cb();
},
all: function(cb) {
cb(null, botkit.memory_store.teams);
}
Expand All @@ -996,6 +1000,10 @@ function Botkit(configuration) {
cb('No ID specified');
}
},
delete: function(user_id, cb) {
delete(botkit.memory_store.users[user_id]);
cb();
},
all: function(cb) {
cb(null, botkit.memory_store.users);
}
Expand All @@ -1013,6 +1021,10 @@ function Botkit(configuration) {
cb('No ID specified');
}
},
delete: function(user_id, cb) {
delete(botkit.memory_store.channels[channel_id]);
cb();
},
all: function(cb) {
cb(null, botkit.memory_store.channels);
}
Expand Down

0 comments on commit e8fedf6

Please sign in to comment.