-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
955fddb
commit 32ff8a4
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import axios from 'axios'; | ||
const token = sessionStorage.getItem('token'); | ||
const url = import.meta.env.PROD | ||
? '' | ||
: 'http://localhost:3000/rsos/' | ||
|
||
const fetchClubs = () => { | ||
return axios.get(url, { | ||
headers: { | ||
'Authorization': `Bearer ${token}` | ||
} | ||
}) | ||
.then(response => response.data) | ||
} | ||
|
||
export default fetchClubs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import axios from 'axios'; | ||
const token = sessionStorage.getItem('token'); | ||
|
||
const joinRSO = (rsoID) => { | ||
const url = import.meta.env.PROD | ||
? '' | ||
: `http://localhost:3000/rsos/${rsoID}/join` | ||
return axios.post(url, {}, { | ||
headers: { | ||
'Content-Type': 'json', | ||
'Authorization': `Bearer ${token}` | ||
} | ||
}) | ||
.then(response => response.data) | ||
} | ||
|
||
export default joinRSO; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import axios from 'axios'; | ||
const token = sessionStorage.getItem('token'); | ||
|
||
const leaveRSO = (rsoID) => { | ||
const url = import.meta.env.PROD | ||
? '' | ||
: `http://localhost:3000/rsos/${rsoID}/leave` | ||
return axios.post(url, {}, { | ||
headers: { | ||
'Content-Type': 'json', | ||
'Authorization': `Bearer ${token}` | ||
} | ||
}) | ||
.then(response => response.data) | ||
} | ||
|
||
export default leaveRSO; |