Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(types): Strapi v5 types for Fields param
Browse files Browse the repository at this point in the history
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
@@ -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
@@ -73,7 +87,6 @@ type Collection = {
}
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const getCollections = () => {
return strapi.find<Collection>('collection', {
fields: ['firstname'],
@@ -82,7 +95,6 @@ const getCollections = () => {
})
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const getUntyped = () => {
return strapi.find('untyped', {
sort: ['random'],

0 comments on commit 80fb743

Please sign in to comment.