1 | const apiServices = Shopware._private.ApiServices(); |
||
0 ignored issues
–
show
|
|||
2 | |||
3 | export default function initializeApiServices() { |
||
4 | // Add custom api service providers |
||
5 | apiServices.forEach((ApiService) => { |
||
6 | const factoryContainer = this.getContainer('factory'); |
||
7 | const initContainer = this.getContainer('init'); |
||
8 | |||
9 | const apiServiceFactory = factoryContainer.apiService; |
||
10 | const service = new ApiService(initContainer.httpClient, Shopware.Service('loginService')); |
||
0 ignored issues
–
show
The variable
Shopware seems to be never declared. If this is a global, consider adding a /** global: Shopware */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN.
Loading history...
|
|||
11 | const serviceName = service.name; |
||
12 | apiServiceFactory.register(serviceName, service); |
||
13 | |||
14 | this.addServiceProvider(serviceName, () => { |
||
15 | return service; |
||
16 | }); |
||
17 | }); |
||
18 | } |
||
19 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.