Skip to content

Commit 9d617f2

Browse files
committed
updated
1 parent b166fe8 commit 9d617f2

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/main/java/com/restgo/demo/controller/ContactController.java

-1
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,4 @@ public Result deleteById( @PathVariable(value = "contactId") Integer id){
4848
return service.deleteById(id);
4949
}
5050

51-
5251
}

src/main/java/com/restgo/demo/service/LoginService.java

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
@Service
99
public class LoginService {
10+
1011
@Autowired
1112
Session session;
1213

src/main/resources/templates/index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
Add
2121
</button>
2222
<button type="button"
23-
class="btn btn-warning mb-2"
23+
class="btn btn-warning mb-2 float-right"
2424
id="logout">
2525
Logout
2626
</button>
@@ -118,8 +118,8 @@ <h5 class="modal-title">Are you sure to delete this contact?</h5>
118118
if (contactName.val().length < 5 || contactNumber.val().length != 12){
119119
validateName.show(500);
120120
validateNumber.show(500);
121-
setTimeout(function () {
122-
validateName.hide(500);
121+
setTimeout(function () {
122+
validateName.hide(500);
123123
validateNumber.hide(500);
124124
},4000)
125125
}else {
@@ -165,7 +165,7 @@ <h5 class="modal-title">Are you sure to delete this contact?</h5>
165165
contactModal.find('.modal-title').text('Add contact');
166166
contactModal.modal('toggle');
167167
contactForm[0].reset();
168-
})
168+
});
169169
logout.click(function () {
170170
if (confirm('Are you sure to logout')){
171171
$.ajax({

src/main/resources/templates/login.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ <h3 class="alert-info" style="display: none" id="error"> Login or Password is wr
3131
var error = $("#error");
3232
var authForm = $("#authForm");
3333
var btnAuth = $("#btnAuth");
34+
3435
$(document).ready(function () {
3536
btnAuth.click(function (event) {
3637
event.preventDefault();
@@ -43,7 +44,6 @@ <h3 class="alert-info" style="display: none" id="error"> Login or Password is wr
4344
if (data.success){
4445
document.location = '/index';
4546
}else {
46-
alert(data.message);
4747
error.show(500);
4848
}
4949
}

0 commit comments

Comments
 (0)