@@ -15,7 +15,7 @@ import fetch from "node-fetch";
15
15
* @returns An object containing the fetched content types and the state of the fetch request.
16
16
*/
17
17
export const getContentTypes = ( ) => {
18
- const { host, apiKey } = getPreferenceValues < Preferences > ( ) ;
18
+ const { host, apiKey } = getPreferenceValues ( ) ;
19
19
20
20
const res = useFetch < ContentTypesResponse > ( `${ host } /api/content-type-builder/content-types` , {
21
21
headers : {
@@ -44,7 +44,7 @@ export const getContentTypes = () => {
44
44
* @returns The fetched content type.
45
45
*/
46
46
export const getContentType = ( uid : string ) => {
47
- const { host, apiKey } = getPreferenceValues < Preferences > ( ) ;
47
+ const { host, apiKey } = getPreferenceValues ( ) ;
48
48
49
49
const res = useFetch < ContentTypeResponse > ( `${ host } /api/content-type-builder/content-types/${ uid } ` , {
50
50
headers : {
@@ -74,7 +74,7 @@ export const getContentType = (uid: string) => {
74
74
* @returns An object containing the fetched entries and the state of the fetch request.
75
75
*/
76
76
export const getEntries = ( route : string ) => {
77
- const { host, apiKey } = getPreferenceValues < Preferences > ( ) ;
77
+ const { host, apiKey } = getPreferenceValues ( ) ;
78
78
79
79
const res = useFetch < EntryResponse > ( `${ host } /api${ route } ?status=draft&pagination[limit]=10000` , {
80
80
headers : {
@@ -100,7 +100,7 @@ export const getEntries = (route: string) => {
100
100
* @param data - The data to submit.
101
101
*/
102
102
export const createEntry = async ( route : string , data : object ) => {
103
- const { host, apiKey } = getPreferenceValues < Preferences > ( ) ;
103
+ const { host, apiKey } = getPreferenceValues ( ) ;
104
104
105
105
const res = await fetch ( `${ host } /api${ route } ` , {
106
106
method : "POST" ,
@@ -121,7 +121,7 @@ export const createEntry = async (route: string, data: object) => {
121
121
* @param uid - The UID of the component to fetch.
122
122
*/
123
123
export const getComponent = ( uid : string ) => {
124
- const { host, apiKey } = getPreferenceValues < Preferences > ( ) ;
124
+ const { host, apiKey } = getPreferenceValues ( ) ;
125
125
126
126
const res = useFetch < ComponentResponse > ( `${ host } /api/content-type-builder/components/${ uid } ` , {
127
127
headers : {
@@ -141,7 +141,7 @@ export const getComponent = (uid: string) => {
141
141
* @returns An array containing the fetched files and the state of the fetch request.
142
142
*/
143
143
export const getFiles = ( ) => {
144
- const { host, apiKey } = getPreferenceValues < Preferences > ( ) ;
144
+ const { host, apiKey } = getPreferenceValues ( ) ;
145
145
146
146
const res = useFetch < StrapiFile [ ] > ( `${ host } /api/upload/files` , {
147
147
headers : {
0 commit comments