core: update contentType for import

This commit is contained in:
undefined committed 2021-04-06 12:01:26 +08:00
1 parent 4904b16fa5
commit e701807cbc
7 files changed
+23 -19

No files matched your search

+3 -3
View File
@@ -74,14 +74,14 @@ export async function load(call: Entry) {
const expected = scripts.length;
while (dbVer < expected) {
logger.info('Upgrading database: from %d to %d', dbVer, expected);
const func = scripts[dbVer];
if (isFresh) {
const func = scripts[dbVer].toString();
if (func.includes('_FRESH_INSTALL_IGNORE')) {
if (typeof func !== 'function' || func.toString().includes('_FRESH_INSTALL_IGNORE')) {
dbVer++;
continue;
}
}
const result = await scripts[dbVer]();
const result = await func();
if (!result) break;
dbVer++;
await modelSystem.set('db.ver', dbVer);