Skip to content

Commit

Permalink
Update API Router imports to use @faustjs/core/api
Browse files Browse the repository at this point in the history
  • Loading branch information
blakewilson committed Oct 14, 2021
1 parent 96a94c2 commit 6f26203
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/next/guides/post-page-previews.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
```
Expand Down
4 changes: 2 additions & 2 deletions docs/next/reference/api-router.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
```
Expand Down Expand Up @@ -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;
```
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/server/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
* ```
Expand Down

1 comment on commit 6f26203

@headless-platform-by-wp-engine

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Branch site-dev was deployed successfully
Your environment Development of app faustjs-site was successfully updated
View build logs: https://my.wpengine.com/atlas#/faustjs-site/cixzyt38dn5ak04xxcqc36lf/3nbfut49hx94x55fkwmelkq7
View your environment URL: https://hcixzyt38dn5ak04xxcqc36lf.js.wpenginepowered.com

Please sign in to comment.