mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Provide getSchema function in hook/endpoint registration function
Fixes #4621
This commit is contained in:
@@ -38,6 +38,7 @@ that is scoped to `/custom/<extension-name>`, while `context` holds the followin
|
||||
- `services` — All API internal services.
|
||||
- `exceptions` — API exception objects that can be used to throw "proper" errors.
|
||||
- `database` — Knex instance that is connected to the current database.
|
||||
- `getSchema` — Async function that reads the full available schema for use in services
|
||||
- `env` — Parsed environment variables.
|
||||
|
||||
## 3. Restart the API
|
||||
|
||||
@@ -126,6 +126,7 @@ The `registerHook` function receives a context parameter with the following prop
|
||||
- `services` — All API internal services
|
||||
- `exceptions` — API exception objects that can be used for throwing "proper" errors
|
||||
- `database` — Knex instance that is connected to the current database
|
||||
- `getSchema` — Async function that reads the full available schema for use in services
|
||||
- `env` — Parsed environment variables
|
||||
|
||||
### Event Handler Function
|
||||
|
||||
Reference in New Issue
Block a user