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