fix: delete collection load middleware

This commit is contained in:
chenos 2021-01-15 23:54:50 +08:00
parent 9d95a27a7f
commit dba1f1fbc6

View File

@ -33,14 +33,4 @@ export default async function (this: Application, options = {}) {
Model.addHook(hookKey, hooks[modelName][hookKey]); Model.addHook(hookKey, hooks[modelName][hookKey]);
}); });
}); });
let initialized = false;
this.use(async (ctx, next) => {
if (!initialized) {
await database.getModel('collections').load({skipExisting: true});
initialized = true;
}
await next();
});
} }