core: feat: problem_delete

This commit is contained in:
undefined committed 2021-01-19 00:06:08 +08:00
1 parent 93dddbd0d5
commit 403565d956
4 files changed
+11 -7

No files matched your search

+1
View File
@@ -141,6 +141,7 @@ export function del(domainId: string, docId: number) {
return Promise.all([
document.deleteOne(domainId, document.TYPE_PROBLEM, docId),
document.deleteMultiStatus(domainId, document.TYPE_PROBLEM, { docId }),
storage.list(`problem/${domainId}/${docId}/`, true).then((items) => storage.del(items.map((item) => item.prefix + item.name))),
bus.parallel('problem/delete', domainId, docId),
]);
}