Unhandled Rejection (TypeError): result.then is not a function
const getEmail = async (userId) => {
const query = new moralis.Query(moralis.User);
const result = await query.get(userId);
const email = result.then((user) => {
return user.get("email");
});
return email;
};