Skip to content

Commit 1b7dd0d

Browse files
committed
Fix signup.js to use new response structure
1 parent 2c7c7ce commit 1b7dd0d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

web-assets/js/signup.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,14 @@ $(document).ready(function () {
4747
xhrFields: {
4848
withCredentials: true,
4949
},
50+
dataType: 'json',
5051
success: function (result) {
51-
if (
52-
result.result.status === 200 &&
53-
!result.result.content.valid
54-
) {
55-
$("#error").html("Error: " + result.result.content.reason);
52+
if (result && result.valid === false) {
53+
$("#error").html("Error: Invalid or unavailable handle");
5654
$("#error").closest(".message").fadeIn();
55+
return;
5756
}
58-
if (result.result.status === 200 && result.result.content.valid && submit_flag) {
57+
if (result && result.valid && submit_flag) {
5958
$("#error").closest(".message").fadeOut();
6059
$("#error").html("");
6160
let formAction = qs["formAction"];

0 commit comments

Comments
 (0)