From 6f26203b33ff82bf219084bd4bb5b2f8087e4856 Mon Sep 17 00:00:00 2001 From: Blake Wilson Date: Thu, 14 Oct 2021 12:56:09 -0500 Subject: [PATCH] Update API Router imports to use `@faustjs/core/api` --- docs/next/guides/post-page-previews.mdx | 2 +- docs/next/reference/api-router.mdx | 4 ++-- packages/core/src/server/router/index.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/next/guides/post-page-previews.mdx b/docs/next/guides/post-page-previews.mdx index 4dec226f7..fd9843967 100644 --- a/docs/next/guides/post-page-previews.mdx +++ b/docs/next/guides/post-page-previews.mdx @@ -60,7 +60,7 @@ Next, you will need to create the `apiRouter`. This sets up the Faust.js API end ```ts import 'faust.config'; -import { apiRouter } from '@faustjs/core'; +import { apiRouter } from '@faustjs/core/api'; export default apiRouter; ``` diff --git a/docs/next/reference/api-router.mdx b/docs/next/reference/api-router.mdx index 3055b925d..86e421334 100644 --- a/docs/next/reference/api-router.mdx +++ b/docs/next/reference/api-router.mdx @@ -27,7 +27,7 @@ Now, add the following content to your newly created `[[...route]].ts` file: ```tsx title="src/pages/api/faust/[[...route]].ts" import 'faust.config'; -import { apiRouter } from '@faustjs/core'; +import { apiRouter } from '@faustjs/core/api'; export default apiRouter; ``` @@ -69,7 +69,7 @@ Finally, the content of `src/pages/api/headless/[[...route]].ts` would be: ```ts title="src/pages/api/headless/[[...route]].ts" import 'faust.config'; -import { apiRouter } from '@faustjs/core'; +import { apiRouter } from '@faustjs/core/api'; export default apiRouter; ``` diff --git a/packages/core/src/server/router/index.ts b/packages/core/src/server/router/index.ts index dea429060..a4db86a8b 100644 --- a/packages/core/src/server/router/index.ts +++ b/packages/core/src/server/router/index.ts @@ -14,7 +14,7 @@ import { * @example ```ts * // filename: pages/api/faust/[[...route]].ts * import 'faust.config'; - * import { apiRouter } from '@faustjs/core'; + * import { apiRouter } from '@faustjs/core/api'; * * export default apiRouter; * ```