修复创建脚本选择目录

This commit is contained in:
whyour
2022-06-04 01:26:01 +08:00
parent 106b34e33a
commit 05d47be1c8
6 changed files with 52 additions and 36 deletions
+2 -2
View File
@@ -9,12 +9,12 @@ import Logger from './loaders/logger';
async function startServer() {
const app = express();
await require('./loaders/db').default();
await require('./loaders/initFile').default();
await require('./loaders/sentry').default({ expressApp: app });
await require('./loaders/db').default();
await require('./loaders/app').default({ expressApp: app });
const server = app
-3
View File
@@ -293,7 +293,6 @@ export function readDirs(
if (stats.isDirectory()) {
return {
title: file,
value: file,
key,
type: 'directory',
disabled: true,
@@ -303,7 +302,6 @@ export function readDirs(
}
return {
title: file,
value: file,
type: 'file',
key,
parent: relativePath,
@@ -327,7 +325,6 @@ export function readDir(
const key = path.join(relativePath, file);
return {
title: file,
value: file,
type: stats.isDirectory() ? 'directory' : 'file',
key,
parent: relativePath,
+1 -3
View File
@@ -18,9 +18,7 @@ export default async () => {
await AppModel.sync();
await AuthModel.sync();
await EnvModel.sync();
await SubscriptionModel.sync({ alter: true });
await sequelize.sync();
await SubscriptionModel.sync();
// try {
// const queryInterface = sequelize.getQueryInterface();