Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then((upload) => {
console.log('Uploading ' + path.basename(options.media))
return Client.Media.configurePhoto(session, upload.params.uploadId, options.caption)
})
.then((response) => resolve('Success'))
const get = async id => {
if (user) {
let session = await loadSession(user)
let media = await api.Media.getById(session, id)
return media
}
}