2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-08-31 06:05:22 +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 =>
Group.insert(group)
.catch(logError);
Group.update(group.id, group, { upsert: true });
const listGroups = () =>
Group.find({});