Skip to content
Snippets Groups Projects
Commit 751c9545 authored by 문경호's avatar 문경호
Browse files

Merge: Merge diet frontend

parent 5a6f1f3c
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@ const getDietData = async (date = null, start_date = null, end_date = null) => {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${localStorage.getItem('accessToken')}`
},
});
};
......@@ -37,6 +38,7 @@ const getUserData = async (fields = []) => {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${localStorage.getItem('accessToken')}`
},
};
}
......@@ -46,6 +48,7 @@ const createDiet = async ({ date, mealtime, food_id, grams }) => {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${localStorage.getItem('accessToken')}`
},
body: JSON.stringify({ date, mealtime, food_id, grams }),
});
......@@ -56,6 +59,7 @@ const deleteDiet = async ({ date, mealtime, food_id }) => {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${localStorage.getItem('accessToken')}`
},
body: JSON.stringify({ date, mealtime, food_id }),
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment