mirror of
https://github.com/xfarrow/blink
synced 2025-02-11 07:30:35 +01:00
Update register.html
This commit is contained in:
parent
b5d3cf1536
commit
9a79356778
@ -33,15 +33,18 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../js/constants.js"></script>
|
||||
<script src="../js/utils.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
function register(){
|
||||
const display_name = document.getElementById("displayname").value;
|
||||
const email = document.getElementById("email").value;
|
||||
const password = document.getElementById("password").value;
|
||||
const display_name = document.getElementById('displayname').value;
|
||||
const email = document.getElementById('email').value;
|
||||
const password = document.getElementById('password').value;
|
||||
|
||||
if(!display_name || !email || !password){
|
||||
return;
|
||||
alert('Please fill in all fields');
|
||||
}
|
||||
|
||||
const options = {
|
||||
@ -52,7 +55,7 @@
|
||||
body: JSON.stringify({ display_name, email, password }),
|
||||
};
|
||||
|
||||
fetch('http://localhost:3000/blinkapi/register', options)
|
||||
fetch(`${API_URL}/register`, options)
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
alert("Congratulations! You've successfully registered to Blink." +
|
||||
|
Loading…
x
Reference in New Issue
Block a user