contact API added

This commit was merged in pull request #99.
This commit is contained in:
victorAnumudu
2024-07-16 21:03:11 +01:00
parent eb57654d59
commit 44d99f5e20
2 changed files with 91 additions and 39 deletions
+8 -7
View File
@@ -1,11 +1,12 @@
import Axios from 'axios';
import getConfig from './../Config/config'
import axios from 'axios';
async function ContactData(callData) {
// debugger;
var site = getConfig()[0];
let response = await Axios.post(`${process.env.REACT_APP_AUX_ENDPOINT}/sitecontact`, callData);
return response.data.result;
async function ContactData(reqData) {
let formData = new FormData()
for (let value in reqData) {
formData.append(value, reqData[value]);
}
let response = await axios.post(`${process.env.REACT_APP_AUX_ENDPOINT}/sitecontact`, reqData);
return response;
}
export default ContactData;