Feature: Send images from widget

This commit is contained in:
Nithin David Thomas
2020-03-30 12:15:06 +05:30
committed by GitHub
parent e56132c506
commit 6c4e1fdaac
16 changed files with 305 additions and 67 deletions

View File

@@ -7,10 +7,16 @@ const sendMessageAPI = async content => {
return result;
};
const sendAttachmentAPI = async attachment => {
const urlData = endPoints.sendAttachmnet(attachment);
const result = await API.post(urlData.url, urlData.params);
return result;
};
const getConversationAPI = async ({ before }) => {
const urlData = endPoints.getConversation({ before });
const result = await API.get(urlData.url, { params: urlData.params });
return result;
};
export { sendMessageAPI, getConversationAPI };
export { sendMessageAPI, getConversationAPI, sendAttachmentAPI };