core: fix bugs (#435)

This commit is contained in:
panda authored and GitHub committed 2022-10-06 13:29:07 +08:00
1 parent f4b12ef004
commit 4c669e0194
3 files changed
+7 -9

No files matched your search

+3 -6
View File
@@ -7,7 +7,7 @@ import { ObjectID } from 'mongodb';
import { Context } from '../context';
import db from '../service/db';
import {
addon, lib, model, script, service, setting,
addon, builtinModel, lib, script, service, setting,
} from './common';
const argv = cac().parse();
@@ -96,11 +96,8 @@ export async function load(ctx: Context) {
lib(pending, fail, ctx),
service(pending, fail, ctx),
]);
require('../model/index');
await Promise.all([
model(pending, fail, ctx),
setting(pending, fail, require('../model/setting')),
]);
await builtinModel(ctx);
await setting(pending, fail, require('../model/setting'));
ctx.plugin(require('../service/server'));
await addon(pending, fail, ctx);
const scriptDir = path.resolve(__dirname, '..', 'script');