Skip to content

Commit

Permalink
Update API Router import in Auth Docs (#580)
Browse files Browse the repository at this point in the history
* doc: (#519) adding examples for getStaticPaths

* Update API Router auth import docs

* Update API Router imports to use `@faustjs/core/api`

Co-authored-by: William Johnston <[email protected]>
  • Loading branch information
blakewilson and wjohnsto authored Oct 14, 2021
1 parent 7be3af0 commit 1cf2dd7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/next/guides/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Before you get started with implementing an authentication strategy, you'll need

```ts 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
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

0 comments on commit 1cf2dd7

Please sign in to comment.