@@ -7,7 +7,6 @@ class CustomApisEndpoint extends CRUDExtend {
77 super ( endpoint )
88
99 this . endpoint = 'settings/extensions/custom-apis'
10- this . entriesEndpoint = 'extensions'
1110 }
1211
1312 Create ( body ) {
@@ -69,11 +68,11 @@ class CustomApisEndpoint extends CRUDExtend {
6968 )
7069 }
7170
72- GetEntries ( customApiSlug ) {
71+ GetEntries ( customApiId ) {
7372 const { limit, offset, sort, filter } = this
7473
7574 return this . request . send (
76- buildURL ( `${ this . entriesEndpoint } /${ customApiSlug } ` , {
75+ buildURL ( `${ this . endpoint } /${ customApiId } /entries ` , {
7776 limit,
7877 offset,
7978 sort,
@@ -83,32 +82,32 @@ class CustomApisEndpoint extends CRUDExtend {
8382 )
8483 }
8584
86- GetEntry ( customApiSlug , customApiEntryId ) {
85+ GetEntry ( customApiId , customApiEntryId ) {
8786 return this . request . send (
88- `${ this . entriesEndpoint } /${ customApiSlug } /${ customApiEntryId } ` ,
87+ `${ this . endpoint } /${ customApiId } /entries /${ customApiEntryId } ` ,
8988 'GET'
9089 )
9190 }
9291
93- CreateEntry ( customApiSlug , body ) {
92+ CreateEntry ( customApiId , body ) {
9493 return this . request . send (
95- `${ this . entriesEndpoint } /${ customApiSlug } ` ,
94+ `${ this . endpoint } /${ customApiId } /entries ` ,
9695 'POST' ,
9796 body
9897 )
9998 }
10099
101- UpdateEntry ( customApiSlug , customApiEntryId , body ) {
100+ UpdateEntry ( customApiId , customApiEntryId , body ) {
102101 return this . request . send (
103- `${ this . entriesEndpoint } /${ customApiSlug } /${ customApiEntryId } ` ,
102+ `${ this . endpoint } /${ customApiId } /entries /${ customApiEntryId } ` ,
104103 'PUT' ,
105104 body
106105 )
107106 }
108107
109- DeleteEntry ( customApiSlug , customApiEntryId ) {
108+ DeleteEntry ( customApiId , customApiEntryId ) {
110109 return this . request . send (
111- `${ this . entriesEndpoint } /${ customApiSlug } /${ customApiEntryId } ` ,
110+ `${ this . endpoint } /${ customApiId } /entries /${ customApiEntryId } ` ,
112111 'DELETE'
113112 )
114113 }
0 commit comments