add API namespace

This commit is contained in:
Bilal
2020-09-04 08:44:06 +03:00
parent 47935d9eda
commit 5ac94d7274
5 changed files with 17 additions and 15 deletions

View File

@@ -16,7 +16,7 @@ const MakeMoneyMove = (props) => {
useEffect(() => {
const getCashForHomies = async () => {
try {
const cash = await axios.get(`/homies/cash`);
const cash = await axios.get(`/api/homies/cash`);
setHomiesCash(cash.data);
} catch (e) {
console.log("Error fetching", e);
@@ -72,7 +72,7 @@ const MakeMoneyMove = (props) => {
}
}
const submitResponse = await axios.post('/money_moves', moneyMoveRequest);
const submitResponse = await axios.post('/api/money_moves', moneyMoveRequest);
if (submitResponse && submitResponse.status === 200 && submitResponse.data === true) {
M.toast({html: "Money lounde...moved"});