mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: update contentType for import
This commit is contained in:
1 parent
4904b16fa5
commit
e701807cbc
7 files changed
+23
-19
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user