Skip to content

Commit

Permalink
docs(types): Strapi v5 types for Fields param
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopheCVB committed Nov 24, 2024
1 parent b32d715 commit 80fb743
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions playground/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@
<h2>Version</h2>
<pre>{{ version }}</pre>

<h2>API</h2>
<button
type="button"
@click="getCollections"
>
Get collections
</button>
<button
type="button"
@click="getUntyped"
>
Get untyped
</button>

<div v-if="user">
<h2>User</h2>
<button
Expand Down Expand Up @@ -73,7 +87,6 @@ type Collection = {
}
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const getCollections = () => {
return strapi.find<Collection>('collection', {
fields: ['firstname'],
Expand All @@ -82,7 +95,6 @@ const getCollections = () => {
})
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const getUntyped = () => {
return strapi.find('untyped', {
sort: ['random'],
Expand Down

0 comments on commit 80fb743

Please sign in to comment.