Previous version of Tanabata used as visual and functional reference for the new Go + SvelteKit rewrite. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
333 B
JavaScript
20 lines
333 B
JavaScript
$("#auth").on("submit", function submit(e) {
|
|
e.preventDefault();
|
|
$.ajax({
|
|
url: "/auth",
|
|
type: "POST",
|
|
data: $("#auth").serialize(),
|
|
dataType: "json",
|
|
success: function(resp) {
|
|
if (resp.status) {
|
|
location.reload();
|
|
} else {
|
|
alert(resp.error);
|
|
}
|
|
},
|
|
failure: function(err) {
|
|
alert(err);
|
|
}
|
|
});
|
|
});
|