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