Ignore:
Timestamp:
10/12/24 21:32:15 (5 weeks ago)
Author:
macagaso <gasoskamarija@…>
Branches:
master
Parents:
743de55
Message:

Updated version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/resources/static/js/index.js

    r743de55 r43c9090  
    11import { verificationCheck } from "./authentication-shared.js";
    2 
    32function toggleForm(formId, show) {
    43        const form = document.getElementById(formId);
     
    6059                });
    6160            }
     61            else{
     62                alert("Sign in successfull! Now log in!")
     63            }
    6264            return response.json();
    6365        })
    6466        .then(data => {
    65             console.log(data.message); // Handle success message
     67            console.log(data.message);
    6668        })
    6769        .catch(error => {
     
    9799            console.log('Parsed data:', data);
    98100            if (data.success) {
    99                 const name=data.name;
    100                 const surname=data.surname;
    101                 const personalisedSection=document.getElementById("personalised");
    102                 personalisedSection.innerHTML=`Добредојде, ${name} ${surname}!`;
    103101                updateUIBasedOnRole(data.userRole);
    104102            }
     
    108106        })
    109107        .finally(() => {
    110             // Close the form after handling the response
    111108            toggleForm('loginForm', false);
    112109        });
Note: See TracChangeset for help on using the changeset viewer.