added new login API

This commit was merged in pull request #8.
This commit is contained in:
victorAnumudu
2024-05-02 14:00:57 +01:00
parent 3845ecbefe
commit f7f728c066
6 changed files with 42 additions and 21 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
import axios from "axios";
export function postAuxEnd(uri:string, reqData:any):Promise<any> {
// const endPoint = process.env.REACT_APP_USERS_ENDPOINT + uri;
const endPoint = import.meta.env.VITE_APP_USER_ENDPOINT + uri;
const formData = new FormData();
for (let value in reqData) {
formData.append(value, reqData[value]);
}
return axios.post(uri, reqData)
return axios.post(endPoint, formData)
.then((response) => {
console.log(response);
// if (response.data.internal_return == "-9999") {