core: del user cache on group update (#552)

This commit is contained in:
panda authored and GitHub committed 2023-04-07 02:07:27 +08:00
1 parent 5a06be3208
commit 342e9585dd
2 files changed
+13 -11

No files matched your search

+2
View File
@@ -441,10 +441,12 @@ class UserModel {
}
static delGroup(domainId: string, name: string) {
deleteUserCache(domainId);
return collGroup.deleteOne({ domainId, name });
}
static updateGroup(domainId: string, name: string, uids: number[]) {
deleteUserCache(domainId);
return collGroup.updateOne({ domainId, name }, { $set: { uids } }, { upsert: true });
}
}