yuuki/libs/webadmin/static/verify.js
SuperSonic 4737eeba9b Update
2020-01-25 20:32:24 +08:00

18 lines
No EOL
524 B
JavaScript

$(function () {
$('form.login-box').on('submit', function (e) {
$.ajax({
type: "POST",
url: "/verify",
data: $(this).serialize(),
success: function (data) {
if (data.status == 200) {
Cookies.set('yuuki_admin', data.session);
location.reload();
} else {
$(".status").text("Wrong password")
}
}
});
e.preventDefault();
});
});