mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: use domain.host for default
This commit is contained in:
1 parent
cc0fc9e5b3
commit
90579a81ed
7 files changed
+13
-7
No files matched your search
@@ -5,7 +5,7 @@ import user from './model/user';
|
||||
import problem, { Field, Pdoc } from './model/problem';
|
||||
|
||||
export async function iterateAllDomain(cb: (ddoc: DomainDoc, current?: number, total?: number) => Promise<any>) {
|
||||
const ddocs = await domain.getMulti().project({ _id: 1, owner: 1 }).toArray();
|
||||
const ddocs = await domain.getMulti().toArray();
|
||||
for (const i in ddocs) await cb(ddocs[i], +i, ddocs.length);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user