|
43 | 43 | ### Methods |
44 | 44 |
|
45 | 45 | - [addListener](KoaApi.md#addlistener) |
46 | | -- [attachRouter](KoaApi.md#attachrouter) |
47 | 46 | - [callback](KoaApi.md#callback) |
48 | 47 | - [createContext](KoaApi.md#createcontext) |
49 | 48 | - [emit](KoaApi.md#emit) |
|
97 | 96 |
|
98 | 97 | #### Defined in |
99 | 98 |
|
100 | | -[lib/koa-api/src/koa-api.ts:54](https://github.com/ivandotv/nextjs-koa-api/blob/6436201/lib/koa-api/src/koa-api.ts#L54) |
| 99 | +[lib/koa-api/src/koa-api.ts:54](https://github.com/ivandotv/nextjs-koa-api/blob/5ef1256/lib/koa-api/src/koa-api.ts#L54) |
101 | 100 |
|
102 | 101 | ## Properties |
103 | 102 |
|
@@ -233,7 +232,7 @@ node_modules/.pnpm/@types+koa@2.13.4/node_modules/@types/koa/index.d.ts:456 |
233 | 232 |
|
234 | 233 | #### Defined in |
235 | 234 |
|
236 | | -[lib/koa-api/src/koa-api.ts:48](https://github.com/ivandotv/nextjs-koa-api/blob/6436201/lib/koa-api/src/koa-api.ts#L48) |
| 235 | +[lib/koa-api/src/koa-api.ts:48](https://github.com/ivandotv/nextjs-koa-api/blob/5ef1256/lib/koa-api/src/koa-api.ts#L48) |
237 | 236 |
|
238 | 237 | --- |
239 | 238 |
|
@@ -360,29 +359,6 @@ node_modules/.pnpm/@types+node@17.0.31/node_modules/@types/node/events.d.ts:327 |
360 | 359 |
|
361 | 360 | --- |
362 | 361 |
|
363 | | -### attachRouter |
364 | | - |
365 | | -▸ **attachRouter**(`path`, `router`): [`KoaApi`](KoaApi.md)<`TState`, `TContext`\> |
366 | | - |
367 | | -Attaches router to a particular path. Internally it setups a prefix on the router, and calls `router.routes()` and `router.allowedMethods()` |
368 | | - |
369 | | -#### Parameters |
370 | | - |
371 | | -| Name | Type | Description | |
372 | | -| :------- | :----------------------------------------------------------------------------------------------------------------------------------- | :--------------------------- | |
373 | | -| `path` | `string` | path to attach the router to | |
374 | | -| `router` | [`Router`](Router.md)<[`DefaultState`](../interfaces/Koa.DefaultState.md), [`DefaultContext`](../interfaces/Koa.DefaultContext.md)\> | router to attach | |
375 | | - |
376 | | -#### Returns |
377 | | - |
378 | | -[`KoaApi`](KoaApi.md)<`TState`, `TContext`\> |
379 | | - |
380 | | -#### Defined in |
381 | | - |
382 | | -[lib/koa-api/src/koa-api.ts:78](https://github.com/ivandotv/nextjs-koa-api/blob/6436201/lib/koa-api/src/koa-api.ts#L78) |
383 | | - |
384 | | ---- |
385 | | - |
386 | 362 | ### callback |
387 | 363 |
|
388 | 364 | ▸ **callback**(): (`req`: `IncomingMessage` \| `Http2ServerRequest`, `res`: `ServerResponse` \| `Http2ServerResponse`) => `void` |
@@ -1316,7 +1292,7 @@ Run koa api with request and response objects |
1316 | 1292 |
|
1317 | 1293 | #### Defined in |
1318 | 1294 |
|
1319 | | -[lib/koa-api/src/koa-api.ts:89](https://github.com/ivandotv/nextjs-koa-api/blob/6436201/lib/koa-api/src/koa-api.ts#L89) |
| 1295 | +[lib/koa-api/src/koa-api.ts:78](https://github.com/ivandotv/nextjs-koa-api/blob/5ef1256/lib/koa-api/src/koa-api.ts#L78) |
1320 | 1296 |
|
1321 | 1297 | --- |
1322 | 1298 |
|
|
0 commit comments