UNPKG

rap-react

Version:

To make it easy for you to get started with GitLab, here's a list of recommended next steps.

17 lines (16 loc) 643 B
import axiosApiInstance from "../api/axiosAPIClient"; import { endPoints } from "../constants/enums"; import { getAPIPrefix } from "./wrapperService"; const REACT_APP_AUTHAPI_URL = process.env.REACT_APP_AUTHAPI_URL; const SEND_FEEDBACK_EMAIL_URL = endPoints.SEND_FEEDBACK_EMAIL_URL; export const SendEmail = async (input) => { try { const url = `${REACT_APP_AUTHAPI_URL}${getAPIPrefix()}${SEND_FEEDBACK_EMAIL_URL}`; const response = await axiosApiInstance.post(url, input); if (response.status === 200) { return await response.data; } } catch (err) { throw new Error("Exception occurred"); } };