Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. async function transform(dailies) {
  2.     return Promise.map(dailies, (d) => {
  3.         return Promise.map(d.photos, async (raw) => {
  4.             let a = await this.imgService.img(raw)
  5.             return 'data:image/png;base64,' + a.data
  6.         }).then((newPhotos) => {
  7.             d.date = moment(d.date).format('DD/MM/YYYY')
  8.             d.photos = newPhotos
  9.             return d
  10.         })
  11.     })
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement