Skip to content

Commit

Permalink
chore: format all files
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Feb 17, 2025
1 parent 79b85f0 commit ae24a68
Show file tree
Hide file tree
Showing 19 changed files with 1,500 additions and 1,500 deletions.
14 changes: 7 additions & 7 deletions src/Resources/app/administration/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "Resources",
"version": "1.0.0",
"main": "index.js",
"dependencies": {
"diff-match-patch": "^1.0.5"
},
"license": "MIT"
"name": "Resources",
"version": "1.0.0",
"main": "index.js",
"dependencies": {
"diff-match-patch": "^1.0.5"
},
"license": "MIT"
}
246 changes: 123 additions & 123 deletions src/Resources/app/administration/src/api/elasticsearch.js
Original file line number Diff line number Diff line change
@@ -1,138 +1,138 @@
const { ApiService } = Shopware.Classes;

class Elasticsearch extends ApiService {
constructor(
httpClient,
loginService,
apiEndpoint = '_action/frosh-tools/elasticsearch',
) {
super(httpClient, loginService, apiEndpoint);
}
constructor(
httpClient,
loginService,
apiEndpoint = '_action/frosh-tools/elasticsearch',
) {
super(httpClient, loginService, apiEndpoint);
}

status() {
const apiRoute = `${this.getApiBasePath()}/status`;
return this.httpClient
.get(apiRoute, {
headers: this.getBasicHeaders(),
})
.then((response) => {
return ApiService.handleResponse(response);
});
}
status() {
const apiRoute = `${this.getApiBasePath()}/status`;
return this.httpClient
.get(apiRoute, {
headers: this.getBasicHeaders(),
})
.then((response) => {
return ApiService.handleResponse(response);
});
}

indices() {
const apiRoute = `${this.getApiBasePath()}/indices`;
return this.httpClient
.get(apiRoute, {
headers: this.getBasicHeaders(),
})
.then((response) => {
return ApiService.handleResponse(response);
});
}
indices() {
const apiRoute = `${this.getApiBasePath()}/indices`;
return this.httpClient
.get(apiRoute, {
headers: this.getBasicHeaders(),
})
.then((response) => {
return ApiService.handleResponse(response);
});
}

deleteIndex(indexName) {
const apiRoute = `${this.getApiBasePath()}/index/` + indexName;
return this.httpClient
.delete(apiRoute, {
headers: this.getBasicHeaders(),
})
.then((response) => {
return ApiService.handleResponse(response);
});
}
deleteIndex(indexName) {
const apiRoute = `${this.getApiBasePath()}/index/` + indexName;
return this.httpClient
.delete(apiRoute, {
headers: this.getBasicHeaders(),
})
.then((response) => {
return ApiService.handleResponse(response);
});
}

console(method, path, payload) {
const apiRoute = `${this.getApiBasePath()}/console` + path;
return this.httpClient
.request({
url: apiRoute,
method: method,
headers: {
...this.getBasicHeaders(),
'content-type': 'application/json',
},
data: payload,
})
.then((response) => {
return ApiService.handleResponse(response);
});
}
console(method, path, payload) {
const apiRoute = `${this.getApiBasePath()}/console` + path;
return this.httpClient
.request({
url: apiRoute,
method: method,
headers: {
...this.getBasicHeaders(),
'content-type': 'application/json',
},
data: payload,
})
.then((response) => {
return ApiService.handleResponse(response);
});
}

flushAll() {
const apiRoute = `${this.getApiBasePath()}/flush_all`;
return this.httpClient
.post(
apiRoute,
{},
{
headers: this.getBasicHeaders(),
},
)
.then((response) => {
return ApiService.handleResponse(response);
});
}
flushAll() {
const apiRoute = `${this.getApiBasePath()}/flush_all`;
return this.httpClient
.post(
apiRoute,
{},
{
headers: this.getBasicHeaders(),
},
)
.then((response) => {
return ApiService.handleResponse(response);
});
}

reindex() {
const apiRoute = `${this.getApiBasePath()}/reindex`;
return this.httpClient
.post(
apiRoute,
{},
{
headers: this.getBasicHeaders(),
},
)
.then((response) => {
return ApiService.handleResponse(response);
});
}
reindex() {
const apiRoute = `${this.getApiBasePath()}/reindex`;
return this.httpClient
.post(
apiRoute,
{},
{
headers: this.getBasicHeaders(),
},
)
.then((response) => {
return ApiService.handleResponse(response);
});
}

switchAlias() {
const apiRoute = `${this.getApiBasePath()}/switch_alias`;
return this.httpClient
.post(
apiRoute,
{},
{
headers: this.getBasicHeaders(),
},
)
.then((response) => {
return ApiService.handleResponse(response);
});
}
switchAlias() {
const apiRoute = `${this.getApiBasePath()}/switch_alias`;
return this.httpClient
.post(
apiRoute,
{},
{
headers: this.getBasicHeaders(),
},
)
.then((response) => {
return ApiService.handleResponse(response);
});
}

cleanup() {
const apiRoute = `${this.getApiBasePath()}/cleanup`;
return this.httpClient
.post(
apiRoute,
{},
{
headers: this.getBasicHeaders(),
},
)
.then((response) => {
return ApiService.handleResponse(response);
});
}
cleanup() {
const apiRoute = `${this.getApiBasePath()}/cleanup`;
return this.httpClient
.post(
apiRoute,
{},
{
headers: this.getBasicHeaders(),
},
)
.then((response) => {
return ApiService.handleResponse(response);
});
}

reset() {
const apiRoute = `${this.getApiBasePath()}/reset`;
return this.httpClient
.post(
apiRoute,
{},
{
headers: this.getBasicHeaders(),
},
)
.then((response) => {
return ApiService.handleResponse(response);
});
}
reset() {
const apiRoute = `${this.getApiBasePath()}/reset`;
return this.httpClient
.post(
apiRoute,
{},
{
headers: this.getBasicHeaders(),
},
)
.then((response) => {
return ApiService.handleResponse(response);
});
}
}

export default Elasticsearch;
Loading

0 comments on commit ae24a68

Please sign in to comment.