mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
core: add domain delete
This commit is contained in:
1 parent
71f86cf79b
commit
ef73b97089
8 files changed
+23
-2
No files matched your search
@@ -428,6 +428,11 @@ async function ensureIndexes() {
|
||||
}
|
||||
|
||||
bus.once('app/started', ensureIndexes);
|
||||
bus.on('domain/delete', (domainId) => Promise.all([
|
||||
coll.deleteMany({ domainId }),
|
||||
collStatus.deleteMany({ domainId }),
|
||||
]));
|
||||
|
||||
global.Hydro.model.document = {
|
||||
coll,
|
||||
collStatus,
|
||||
|
||||
Reference in new issue
Block a user