Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Now create file `ApartsPie.vue` in the `custom` folder of your project:

Also we have to add an Api to get percentages:

```ts title="./index.ts"
```ts title="/api.ts"
import type { IAdminUserExpressRequest } from 'adminforth';
import express from 'express';
import * as z from 'zod';
Expand Down Expand Up @@ -152,10 +152,6 @@ import * as z from 'zod';
)
)
);

// serve after you added all api
admin.discoverDatabases();
admin.express.serve(app)
```

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.
Expand Down