@@ -126,7 +126,7 @@ class HTTPEngine extends Engine {
126
126
*
127
127
* @throws {HTTPRequestFailedError } Thrown if the fetch request fails.
128
128
*/
129
- static async getById ( id ) {
129
+ static getById ( id ) {
130
130
this . checkConfiguration ( ) ;
131
131
132
132
const url = new URL ( [
@@ -135,7 +135,7 @@ class HTTPEngine extends Engine {
135
135
`${ id } .json` ,
136
136
] . filter ( e => Boolean ( e ) ) . join ( '/' ) ) ;
137
137
138
- return await this . _processFetch ( url , this . _getReadOptions ( ) ) ;
138
+ return this . _processFetch ( url , this . _getReadOptions ( ) ) ;
139
139
}
140
140
141
141
/**
@@ -177,7 +177,7 @@ class HTTPEngine extends Engine {
177
177
'_index.json' ,
178
178
] . filter ( e => Boolean ( e ) ) . join ( '/' ) ) ;
179
179
180
- return await this . _processFetch ( url , {
180
+ return this . _processFetch ( url , {
181
181
...this . _getWriteOptions ( ) ,
182
182
body : JSON . stringify ( {
183
183
...await this . getIndex ( location ) ,
@@ -199,15 +199,15 @@ class HTTPEngine extends Engine {
199
199
* @param {Model.constructor? } model - The model in the host where the index is stored.
200
200
* @returns {Promise<Object> } The index data in JSON format.
201
201
*/
202
- static async getIndex ( model ) {
202
+ static getIndex ( model ) {
203
203
const url = new URL ( [
204
204
this . configuration . host ,
205
205
this . configuration . prefix ,
206
206
model ?. toString ( ) ,
207
207
'_index.json' ,
208
208
] . filter ( e => Boolean ( e ) ) . join ( '/' ) ) ;
209
209
210
- return await this . _processFetch ( url , this . _getReadOptions ( ) , { } ) ;
210
+ return this . _processFetch ( url , this . _getReadOptions ( ) , { } ) ;
211
211
}
212
212
213
213
/**
@@ -216,15 +216,15 @@ class HTTPEngine extends Engine {
216
216
* @param {Model.constructor } model - The model whose compiled search index to retrieve.
217
217
* @returns {Promise<Object> } The compiled search index in JSON format.
218
218
*/
219
- static async getSearchIndexCompiled ( model ) {
219
+ static getSearchIndexCompiled ( model ) {
220
220
const url = new URL ( [
221
221
this . configuration . host ,
222
222
this . configuration . prefix ,
223
223
model . toString ( ) ,
224
224
'_search_index.json' ,
225
225
] . join ( '/' ) ) ;
226
226
227
- return await this . _processFetch ( url , this . _getReadOptions ( ) ) ;
227
+ return this . _processFetch ( url , this . _getReadOptions ( ) ) ;
228
228
}
229
229
230
230
/**
@@ -233,15 +233,15 @@ class HTTPEngine extends Engine {
233
233
* @param {Model.constructor } model - The model whose raw search index to retrieve.
234
234
* @returns {Promise<Object> } The raw search index in JSON format, or an empty object if not found.
235
235
*/
236
- static async getSearchIndexRaw ( model ) {
236
+ static getSearchIndexRaw ( model ) {
237
237
const url = new URL ( [
238
238
this . configuration . host ,
239
239
this . configuration . prefix ,
240
240
model . toString ( ) ,
241
241
'_search_index_raw.json' ,
242
242
] . join ( '/' ) ) ;
243
243
244
- return await this . _processFetch ( url , this . _getReadOptions ( ) ) . catch ( ( ) => ( { } ) ) ;
244
+ return this . _processFetch ( url , this . _getReadOptions ( ) ) . catch ( ( ) => ( { } ) ) ;
245
245
}
246
246
247
247
/**
@@ -253,7 +253,7 @@ class HTTPEngine extends Engine {
253
253
*
254
254
* @throws {HTTPRequestFailedError } Thrown if the PUT request fails.
255
255
*/
256
- static async putSearchIndexCompiled ( model , compiledIndex ) {
256
+ static putSearchIndexCompiled ( model , compiledIndex ) {
257
257
const url = new URL ( [
258
258
this . configuration . host ,
259
259
this . configuration . prefix ,
@@ -276,15 +276,15 @@ class HTTPEngine extends Engine {
276
276
*
277
277
* @throws {HTTPRequestFailedError } Thrown if the PUT request fails.
278
278
*/
279
- static async putSearchIndexRaw ( model , rawIndex ) {
279
+ static putSearchIndexRaw ( model , rawIndex ) {
280
280
const url = new URL ( [
281
281
this . configuration . host ,
282
282
this . configuration . prefix ,
283
283
model . toString ( ) ,
284
284
'_search_index_raw.json' ,
285
285
] . filter ( e => Boolean ( e ) ) . join ( '/' ) ) ;
286
286
287
- return await this . _processFetch ( url , {
287
+ return this . _processFetch ( url , {
288
288
...this . _getWriteOptions ( ) ,
289
289
body : JSON . stringify ( rawIndex ) ,
290
290
} ) ;
0 commit comments