diff --git a/src/components/Groups.tsx b/src/components/Groups.tsx index 556467e..2c3c0d1 100644 --- a/src/components/Groups.tsx +++ b/src/components/Groups.tsx @@ -12,7 +12,7 @@ const Groups = () => { ]); useEffect(() => { - makeAPIGetCall('/groups').then((res) => { + makeAPIGetCall('/browse/groups').then((res) => { if (res.data.data) { setGroups(res.data.data); } diff --git a/src/components/MyGroups.tsx b/src/components/MyGroups.tsx index 7cfb937..ba7cbf5 100644 --- a/src/components/MyGroups.tsx +++ b/src/components/MyGroups.tsx @@ -12,7 +12,7 @@ const MyGroups = () => { ]); useEffect(() => { - makeAPIGetCall('/groups').then((res) => { + makeAPIGetCall('/browse/groups').then((res) => { if (res.data.data) { setGroups(res.data.data); } @@ -48,7 +48,7 @@ const MyGroups = () => { className="card card-body text-left" style={{ backgroundColor: background }} > - + {group.name} diff --git a/src/components/MyPools.tsx b/src/components/MyPools.tsx index 50a3434..1c2eb17 100644 --- a/src/components/MyPools.tsx +++ b/src/components/MyPools.tsx @@ -56,7 +56,7 @@ const MyPools = () => { ]); useEffect(() => { - makeAPIGetCall('/my_pools').then((res) => { + makeAPIGetCall('/users/@me/pools').then((res) => { if (res.data.data) { setPools(res.data.data); } @@ -94,7 +94,7 @@ const MyPools = () => { className="card card-body text-left" style={{ backgroundColor: background }} > - + {pool.pool_title}
diff --git a/src/components/Pool.tsx b/src/components/Pool.tsx index 0b2d2ab..05813cf 100644 --- a/src/components/Pool.tsx +++ b/src/components/Pool.tsx @@ -77,7 +77,7 @@ export default function Pool() { const onRegister = useCallback(() => { if (user) { let userID = user._id; - makeAPIPostCall('/join_pool', { id }).then(() => { + makeAPIPostCall(`/pools/${id}/join`).then(() => { if (pool) { setPool({ ...pool, @@ -89,7 +89,7 @@ export default function Pool() { }, [user, id, pool]); useEffect(() => { - makeAPIGetCall('/pool', { poolID: id }).then((response) => { + makeAPIGetCall(`/pools/${id}`).then((response) => { if (response.data.data) { setPool(response.data.data); } diff --git a/src/components/Pools.tsx b/src/components/Pools.tsx index 3b964ee..04ba013 100644 --- a/src/components/Pools.tsx +++ b/src/components/Pools.tsx @@ -59,7 +59,7 @@ const Pools = () => { ]); useEffect(() => { - makeAPIGetCall('/my_pools').then((res) => { + makeAPIGetCall(`/users/@me/pools`).then((res) => { if (res.data.data) { setPools(res.data.data); } @@ -95,7 +95,7 @@ const Pools = () => { className="card card-body text-left" style={{ backgroundColor: background }} > - + {pool.title}
diff --git a/src/components/Profile.tsx b/src/components/Profile.tsx
index 97ea5c6..54ad93f 100644
--- a/src/components/Profile.tsx
+++ b/src/components/Profile.tsx
@@ -25,7 +25,7 @@ const Profile = () => {
const classes = useStyles();
useEffect(() => {
- makeAPIGetCall('/my_pools').then((res) => {
+ makeAPIGetCall('/users/@me/pools').then((res) => {
if (res.data.data) setPools(res.data.data);
});
}, []);
@@ -56,7 +56,7 @@ const Profile = () => {
className={classes.root + 'd-inline-flex'}
style={{ margin: '0.5rem' }}
>
-