@capawesome/cli
Version:
The Capawesome Cloud Command Line Interface (CLI) to manage Live Updates and more.
20 lines (19 loc) • 689 B
JavaScript
import authorizationService from '../services/authorization-service.js';
import httpClient from '../utils/http-client.js';
class AppEnvironmentsServiceImpl {
httpClient;
constructor(httpClient) {
this.httpClient = httpClient;
}
async findAll(dto) {
const { appId } = dto;
const response = await this.httpClient.get(`/v1/apps/${appId}/environments`, {
headers: {
Authorization: `Bearer ${authorizationService.getCurrentAuthorizationToken()}`,
},
});
return response.data;
}
}
const appEnvironmentsService = new AppEnvironmentsServiceImpl(httpClient);
export default appEnvironmentsService;