rap-react
Version:
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
26 lines (23 loc) • 981 B
JavaScript
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 REACT_APP_EXPAPI_URL = process.env.REACT_APP_EXPAPI_URL;
const RESET_PASSWORD_URL = endPoints.RESET_PASSWORD_URL;
const SEND_FEEDBACK_URL = endPoints.SEND_FEEDBACK_URL;
export const SendFeedback = async (input, brandID) => {
try {
const url = `${REACT_APP_EXPAPI_URL}${SEND_FEEDBACK_URL}${brandID}`;
const response = await axiosApiInstance.post(url, input);
if (response.status === 200) {
return await response.data;
}
} catch (err) {
throw new Error("Exception occurred");
}
};
export const ResetPassword = async (input) => {
const url = `${REACT_APP_AUTHAPI_URL}${getAPIPrefix()}${RESET_PASSWORD_URL}`;
const response = await axiosApiInstance.post(url, input);
return await response.data;
};