mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 02:57:57 +00:00 
			
		
		
		
	 16fe912fbd
			
		
	
	16fe912fbd
	
	
	
		
			
			Co-authored-by: Nithin David Thomas <webofnithin@gmail.com> Co-authored-by: Sojan Jose <sojan@pepalo.com>
		
			
				
	
	
		
			17 lines
		
	
	
		
			493 B
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			493 B
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable File
		
	
	
	
	
| import endPoints from 'widget/api/endPoints';
 | |
| import { API } from 'widget/helpers/axios';
 | |
| 
 | |
| const sendMessageAPI = async content => {
 | |
|   const urlData = endPoints.sendMessage(content);
 | |
|   const result = await API.post(urlData.url, urlData.params);
 | |
|   return result;
 | |
| };
 | |
| 
 | |
| const getConversationAPI = async conversationId => {
 | |
|   const urlData = endPoints.getConversation(conversationId);
 | |
|   const result = await API.get(urlData.url);
 | |
|   return result;
 | |
| };
 | |
| 
 | |
| export { sendMessageAPI, getConversationAPI };
 |