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:
@@ -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({});
|
||||||
|
Reference in New Issue
Block a user