diff --git a/frontend/www/scripts/profile.js b/frontend/www/scripts/profile.js index 344851608f7444978d33deecd65fd20836ab12db..39e78673783c8bf8e2840cc6ac440e38aca1361b 100644 --- a/frontend/www/scripts/profile.js +++ b/frontend/www/scripts/profile.js @@ -9,7 +9,7 @@ function handleCancelButtonDuringCreate() { } /** - * If user presses "cancel" during editing a group the + * If user presses "cancel" during editing the profile the * form fields become read only and the form data is deleted. * And the buttons change. */ @@ -35,7 +35,7 @@ function handleCancelButtonDuringEdit() { /** * If the user clicks on the edit button the form fields can be edited. - * And the form is updated with the data of the group that the user wants to edit. + * And the form is updated with the profile data the user wants to change. */ function handleEditProfileButtonClick() { setReadOnly(false, "#form-profile"); @@ -82,8 +82,7 @@ async function getCurrentProfile() { } /** - * Sends a PUT request to the API to update a group's information. - * @param {integer} id of the group to be updated + * Sends a PUT request to the API to update the active users profile information. */ async function updateProfile() { let res = await sendRequest("GET", `${HOST}/api/users/?user=current`); @@ -123,9 +122,7 @@ async function updateProfile() { } /** - * When a user enters the group.html this decides whether it - * is entered in view/edit mode or in create mode. If the html contains - * a url parameter with an id it is entered in view/edit mode. + * When a user enters the profile.html his/her profile information is retrieved */ window.addEventListener("DOMContentLoaded", async () => {