Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async getActivities(token: string) {
- const {data: response} = await lastValueFrom(this.httpService.get(`api/plugins/telemetry/USER/9e8592a0-811e-11ee-b916-ed4de8cf8322/values/timeseries`, {headers: {Authorization: `Bearer ${token}`}}));
- return response.entityType.map((_, index) => {
- const data = {}
- Object.keys(response).forEach(key => {
- if (key === 'activityPic') {
- // const jpg = 'data:image/jpeg;base64,'
- data[key] = response[key][index].value
- } else data[key] = response[key][index].value
- })
- return data
- })
- }
Add Comment
Please, Sign In to add comment