Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
session.getAccountId().then((id) => {
Client.Account.getById(session, id).then(resolve).catch(reject);
});
});
const get = async () => {
if (user) {
try {
let session = await loadSession(user)
let account = await session.getAccount()
let profile = await api.Account.showProfile(session)
return Object.assign({}, account._params, profile)
} catch (e) {
return false
}
}
}
return new Promise((resolve, reject) => {
Client.Account.search(session, search)
.then((users) => {
const userIds = users.map((user) => user.id);
new Client.Feed.UserStory(session, userIds.splice(0, 20)).get()
.then(resolve).catch(reject);
})
.catch(reject)
})
}
session.getAccountId().then((id) => {
Client.Account.getById(session, id).then(resolve).catch(reject);
});
});
return new Promise((resolve, reject) => {
Client.Account.search(session, search).then(resolve).catch(reject)
})
}