diff --git a/README.md b/README.md index af03c84..66ec943 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Chancellor Galiza Project 🚀 +# Midterm exam Project 🚀 This Spring Boot Application contains five end points : diff --git a/frontend/index.html b/frontend/index.html new file mode 100644 index 0000000..949f55b --- /dev/null +++ b/frontend/index.html @@ -0,0 +1,62 @@ + + +
+ + +Error parsing name: ${parsedName.error}
`; + } else { + first.value = parsedName.first + last.value = parsedName.last + } + } catch (error) { + message.innerHTML += `Error: ${error.message}
`; + success = false + } + + try { + // Validate email + const emailResponse = await fetch(`${local}:${port}/validate/email?email=${email}`); + const isEmailValid = await emailResponse.json(); + console.log(isEmailValid) + + if (!isEmailValid) { + message.innerHTML += `Email is invalid.
`; + } else { + message.innerHTML += `Email is valid.
`; + } + } catch (error) { + message.innerHTML += `Error: ${error.message}
`; + success = false + } + + if (success) { + alert('Success') + } + +}); \ No newline at end of file diff --git a/pom.xml b/pom.xml index ac3fad4..5883a9d 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@