Skip to content

Commit e44fc55

Browse files
authored
Merge pull request #562 from devforth/feature/AdminForth/1438/this-is-legacy-mistake-now-adm
fix: update documentation to reflect changes in API file for dashboar…
2 parents 8f7432e + 2df2b31 commit e44fc55

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

adminforth/documentation/docs/tutorial/03-Customization/06-customPages.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,9 @@ Now we have to define this endpoint in the backend to make our page work:
317317
318318
319319
320-
Open `index.ts` file and add the following code *BEFORE* `admin.express.serve(` !
320+
Open `api.ts` file and add the following code *BEFORE* `admin.express.authorize` !
321321
322-
```ts title="/index.ts"
322+
```ts title="/api.ts"
323323
324324
import type { IAdminUserExpressRequest } from 'adminforth';
325325
import express from 'express';
@@ -429,11 +429,6 @@ app.get(`${ADMIN_BASE_URL}/api/dashboard/`,
429429
)
430430
)
431431
);
432-
433-
// serve after you added all api
434-
admin.express.serve(app)
435-
admin.discoverDatabases();
436-
437432
```
438433
439434
Install and import Zod before using this pattern: `pnpm add zod` or `npm install zod`, then `import * as z from 'zod';`. `admin.express.withSchema(...)` will convert the Zod schema to OpenAPI for you.

0 commit comments

Comments
 (0)