Skip to content

Commit 8d4d9ef

Browse files
committed
fix: correct file path for API example in page injections documentation
1 parent 8f7432e commit 8d4d9ef

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

adminforth/documentation/docs/tutorial/03-Customization/08-pageInjections.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Now create file `ApartsPie.vue` in the `custom` folder of your project:
109109
110110
Also we have to add an Api to get percentages:
111111
112-
```ts title="./index.ts"
112+
```ts title="/api.ts"
113113
import type { IAdminUserExpressRequest } from 'adminforth';
114114
import express from 'express';
115115
import * as z from 'zod';
@@ -152,10 +152,6 @@ import * as z from 'zod';
152152
)
153153
)
154154
);
155-
156-
// serve after you added all api
157-
admin.discoverDatabases();
158-
admin.express.serve(app)
159155
```
160156
161157
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)