2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-09-04 08:05:30 +00:00

used update instead of insert method for group db

This commit is contained in:
Pouria Ezzati
2017-09-27 23:17:36 +03:30
parent 6c0aebf715
commit 78d3ca86bd

View File

@@ -16,8 +16,7 @@ Group.ensureIndex({
}); });
const addGroup = group => const addGroup = group =>
Group.insert(group) Group.update(group.id, group, { upsert: true });
.catch(logError);
const listGroups = () => const listGroups = () =>
Group.find({}); Group.find({});