UNPKG

@capawesome/cli

Version:

The Capawesome Cloud Command Line Interface (CLI) to manage Live Updates and more.

25 lines (24 loc) 820 B
import authorizationService from '../services/authorization-service.js'; import httpClient from '../utils/http-client.js'; class AppCertificatesServiceImpl { httpClient; constructor(httpClient) { this.httpClient = httpClient; } async findAll(dto) { const { appId, platform } = dto; const params = {}; if (platform) { params.platform = platform; } const response = await this.httpClient.get(`/v1/apps/${appId}/certificates`, { headers: { Authorization: `Bearer ${authorizationService.getCurrentAuthorizationToken()}`, }, params, }); return response.data; } } const appCertificatesService = new AppCertificatesServiceImpl(httpClient); export default appCertificatesService;