-
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.
client - updated storage model according to the backend routes
- Loading branch information
DoParkEQ
committed
Jul 11, 2021
1 parent
05622b0
commit 0f3f176
Showing
7 changed files
with
48 additions
and
15 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
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
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
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,10 @@ | ||
import axios from 'axios'; | ||
|
||
const PORT = 5000; | ||
const URL = `http://localhost:${PORT}/user`; | ||
|
||
//TODO: get userinfo to fill out UUIDs | ||
export const getUserInfo = async (userId) => { | ||
const res = await axios.get(`${URL}/${userId}`); | ||
return res.data; | ||
}; |
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 |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import axios from 'axios'; | ||
|
||
const PORT = 5000; | ||
const url = `http://localhost:${PORT}/vitals`; | ||
const URL = `http://localhost:${PORT}/vitals`; | ||
|
||
export const getSavedVitals = async () => { | ||
const res = await axios.get(url); | ||
export const getVitals = async (userId) => { | ||
const res = await axios.get(`${URL}/${userId}`); | ||
return res.data; | ||
}; | ||
|
||
export const postVital = (history, userId) => axios.post(`${URL}/${userId}/post`, history); |
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
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