Changeset 43c9090 for src/main/resources/static/js/index.js
- Timestamp:
- 10/12/24 21:32:15 (5 weeks ago)
- Branches:
- master
- Parents:
- 743de55
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/resources/static/js/index.js
r743de55 r43c9090 1 1 import { verificationCheck } from "./authentication-shared.js"; 2 3 2 function toggleForm(formId, show) { 4 3 const form = document.getElementById(formId); … … 60 59 }); 61 60 } 61 else{ 62 alert("Sign in successfull! Now log in!") 63 } 62 64 return response.json(); 63 65 }) 64 66 .then(data => { 65 console.log(data.message); // Handle success message67 console.log(data.message); 66 68 }) 67 69 .catch(error => { … … 97 99 console.log('Parsed data:', data); 98 100 if (data.success) { 99 const name=data.name;100 const surname=data.surname;101 const personalisedSection=document.getElementById("personalised");102 personalisedSection.innerHTML=`Добредојде, ${name} ${surname}!`;103 101 updateUIBasedOnRole(data.userRole); 104 102 } … … 108 106 }) 109 107 .finally(() => { 110 // Close the form after handling the response111 108 toggleForm('loginForm', false); 112 109 });
Note:
See TracChangeset
for help on using the changeset viewer.