import endPointQuery from "../../helpers/EndPointQuery"; import GetDefaultWhatsApp from "../../helpers/GetDefaultWhatsApp"; import { getWbot } from "../../libs/wbot"; const GetProfilePicUrl = async (number: string): Promise => { const defaultWhatsapp = await GetDefaultWhatsApp(); const wbot_url = await getWbot(defaultWhatsapp.id); // const profilePicUrl = await wbot.getProfilePicUrl(`${number}@c.us`); let profilePicUrl = await endPointQuery(`${wbot_url}/api/GetProfilePicUrl`, { number: `${number}`, }) console.log('profilePicUrl.data.data: ', profilePicUrl.data.data) if (profilePicUrl && profilePicUrl.data.data) { console.log('GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG') return profilePicUrl.data.data; } return null }; export default GetProfilePicUrl;