From 8e2fc96e34b536636c07e383df038c5c4e390442 Mon Sep 17 00:00:00 2001
From: Sondre Malerud <sondrmal@stud.ntnu.no>
Date: Fri, 5 May 2023 15:19:18 +0200
Subject: [PATCH] Dokumentasjon

---
 src/util/API.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/util/API.js b/src/util/API.js
index 3fb7d15..ee3458c 100644
--- a/src/util/API.js
+++ b/src/util/API.js
@@ -501,6 +501,10 @@ export const API = {
 
     },
 
+    /**
+     * Gets the week menu to the account currently logged in
+     * @returns a week menu objectt
+     */
     getWeekMenu: () => {
         const authStore = useAuthStore();
         return axios.get(`${import.meta.env.VITE_BACKEND_URL}/weekmenu`, {
@@ -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) => {
         const authStore = useAuthStore();
         return axios.put(`${import.meta.env.VITE_BACKEND_URL}/weekmenu/${numberOfPeople}`, "", {
@@ -531,4 +540,4 @@ export const API = {
 }
 
 
-}
\ No newline at end of file
+}
-- 
GitLab