Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async function transform(dailies) {
- return Promise.map(dailies, (d) => {
- return Promise.map(d.photos, async (raw) => {
- let a = await this.imgService.img(raw)
- return 'data:image/png;base64,' + a.data
- }).then((newPhotos) => {
- d.date = moment(d.date).format('DD/MM/YYYY')
- d.photos = newPhotos
- return d
- })
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement