Skip to content
Snippets Groups Projects
Commit 8e2fc96e authored by Sondre Malerud's avatar Sondre Malerud :coffee:
Browse files

Dokumentasjon

parent be15cf54
No related branches found
No related tags found
No related merge requests found
Pipeline #226715 passed
...@@ -501,6 +501,10 @@ export const API = { ...@@ -501,6 +501,10 @@ export const API = {
}, },
/**
* Gets the week menu to the account currently logged in
* @returns a week menu objectt
*/
getWeekMenu: () => { getWeekMenu: () => {
const authStore = useAuthStore(); const authStore = useAuthStore();
return axios.get(`${import.meta.env.VITE_BACKEND_URL}/weekmenu`, { return axios.get(`${import.meta.env.VITE_BACKEND_URL}/weekmenu`, {
...@@ -515,6 +519,11 @@ export const API = { ...@@ -515,6 +519,11 @@ export const API = {
}); });
}, },
/**
* Generates a week menu to a specified number of people
* @param numberOfPeople the number of people that will eat
* @returns a week menu object
*/
generateWeekMenu: (numberOfPeople) => { generateWeekMenu: (numberOfPeople) => {
const authStore = useAuthStore(); const authStore = useAuthStore();
return axios.put(`${import.meta.env.VITE_BACKEND_URL}/weekmenu/${numberOfPeople}`, "", { return axios.put(`${import.meta.env.VITE_BACKEND_URL}/weekmenu/${numberOfPeople}`, "", {
...@@ -531,4 +540,4 @@ export const API = { ...@@ -531,4 +540,4 @@ export const API = {
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment