UNPKG

@capawesome/cli

Version:

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

20 lines (19 loc) 651 B
import authorizationService from '../services/authorization-service.js'; import httpClient from '../utils/http-client.js'; class JobsServiceImpl { httpClient; constructor(httpClient) { this.httpClient = httpClient; } async update(options) { const { jobId, dto } = options; const response = await this.httpClient.patch(`/v1/jobs/${jobId}`, dto, { headers: { Authorization: `Bearer ${authorizationService.getCurrentAuthorizationToken()}`, }, }); return response.data; } } const jobsService = new JobsServiceImpl(httpClient); export default jobsService;