format
This commit is contained in:
@@ -22,10 +22,8 @@ async function createAdmin() {
|
||||
dashboard: { component: Components.Dashboard },
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV === "development")
|
||||
await admin.watch();
|
||||
else
|
||||
await admin.initialize();
|
||||
if (process.env.NODE_ENV === "development") await admin.watch();
|
||||
else await admin.initialize();
|
||||
|
||||
const router = AdminJSExpress.buildAuthenticatedRouter(
|
||||
admin,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ComponentLoader } from "adminjs";
|
||||
import path from "path";
|
||||
import * as url from "url";
|
||||
|
||||
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
|
||||
const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
|
||||
export const componentLoader = new ComponentLoader();
|
||||
|
||||
const add = (filePath: string, componentName: string): string =>
|
||||
|
||||
Reference in New Issue
Block a user