-
Notifications
You must be signed in to change notification settings - Fork 0
/
addCoins.html
36 lines (32 loc) · 945 Bytes
/
addCoins.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<html>
<head>
<title>Administración de Usuarios</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="lib.js"></script>
</head>
<body>
<label for="fname">Email:</label>
<input type="text" id="iemail" name="fname"><br><br>
<label for="lname">Password:</label>
<input type="text" id="ipassword" name="lname"><br><br>
<labelfor="lname">Coins:</label>
<input type="number" id="icoins" name="lname"><br><br>
<button id="submit">Add Coins</button>
</body>
<script>
$("#submit").click(function() {
sPost(
"http://localhost:8080/api/v1/users/addCoins",
{
password: $("#ipassword").val(),
email: $("#iemail").val(),
coins: $("#icoins").val()
},
function(data) {
alert(data.message);
console.log(data);
}
)
});
</script>
</html>