@@ -7,7 +7,6 @@ class CustomApisEndpoint extends CRUDExtend {
7
7
super ( endpoint )
8
8
9
9
this . endpoint = 'settings/extensions/custom-apis'
10
- this . entriesEndpoint = 'extensions'
11
10
}
12
11
13
12
Create ( body ) {
@@ -69,11 +68,11 @@ class CustomApisEndpoint extends CRUDExtend {
69
68
)
70
69
}
71
70
72
- GetEntries ( customApiSlug ) {
71
+ GetEntries ( customApiId ) {
73
72
const { limit, offset, sort, filter } = this
74
73
75
74
return this . request . send (
76
- buildURL ( `${ this . entriesEndpoint } /${ customApiSlug } ` , {
75
+ buildURL ( `${ this . endpoint } /${ customApiId } /entries ` , {
77
76
limit,
78
77
offset,
79
78
sort,
@@ -83,32 +82,32 @@ class CustomApisEndpoint extends CRUDExtend {
83
82
)
84
83
}
85
84
86
- GetEntry ( customApiSlug , customApiEntryId ) {
85
+ GetEntry ( customApiId , customApiEntryId ) {
87
86
return this . request . send (
88
- `${ this . entriesEndpoint } /${ customApiSlug } /${ customApiEntryId } ` ,
87
+ `${ this . endpoint } /${ customApiId } /entries /${ customApiEntryId } ` ,
89
88
'GET'
90
89
)
91
90
}
92
91
93
- CreateEntry ( customApiSlug , body ) {
92
+ CreateEntry ( customApiId , body ) {
94
93
return this . request . send (
95
- `${ this . entriesEndpoint } /${ customApiSlug } ` ,
94
+ `${ this . endpoint } /${ customApiId } /entries ` ,
96
95
'POST' ,
97
96
body
98
97
)
99
98
}
100
99
101
- UpdateEntry ( customApiSlug , customApiEntryId , body ) {
100
+ UpdateEntry ( customApiId , customApiEntryId , body ) {
102
101
return this . request . send (
103
- `${ this . entriesEndpoint } /${ customApiSlug } /${ customApiEntryId } ` ,
102
+ `${ this . endpoint } /${ customApiId } /entries /${ customApiEntryId } ` ,
104
103
'PUT' ,
105
104
body
106
105
)
107
106
}
108
107
109
- DeleteEntry ( customApiSlug , customApiEntryId ) {
108
+ DeleteEntry ( customApiId , customApiEntryId ) {
110
109
return this . request . send (
111
- `${ this . entriesEndpoint } /${ customApiSlug } /${ customApiEntryId } ` ,
110
+ `${ this . endpoint } /${ customApiId } /entries /${ customApiEntryId } ` ,
112
111
'DELETE'
113
112
)
114
113
}
0 commit comments