Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): fixed code snippets #368

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/content/3.usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ All examples below are demonstrated with http calls in script setup. However, to
When using the composable, you can pass in a default data model for all methods.

```ts
const { find } = useStrapi<Course>()
const { findOne } = useStrapi<Course>()

// typed to Course
findOne('courses', '123')
Expand All @@ -34,7 +34,7 @@ findOne('courses', '123')
If you prefer not to use a default data type and want to override the default, you can pass the data model on individual methods as well.

```ts
const { find } = useStrapi<Course>()
const { findOne } = useStrapi<Course>()

// typed to SpecialCourse
findOne<SpecialCourse>('courses', '123')
Expand Down