Commit ca8b65e2 by jaymehta
2 parents e9dcc47e 25eaa001
import axios from "axios";
import qs from "qs";
import { GET_TESTIMONIAL_FAIL, GET_TESTIMONIAL_REQUEST, GET_TESTIMONIAL_SUCCESS } from "../constants/testimonialConstants";
export const newsletter = async email => {
try {
console.log("email", email);
const config = {
headers: {
"Content-Type": "application/json"
}
};
const data = {
data: {
email: email
}
};
const response = await axios.post(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/newsletters`, data, config);
console.log("response > ", response.data);
return response.data;
} catch (error) {}
};
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!