소스 검색

fix register form

latapp 9 달 전
부모
커밋
558c8a1625
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      public/register/app.js

+ 1 - 1
public/register/app.js

@@ -51,7 +51,7 @@ document.getElementById('registerForm').addEventListener('submit', function (e)
         body: JSON.stringify(data)
     })
         .then(response => {
-            if (response.status === 400) {
+            if (response.status !== 200 && response.status !== 201) {
                 return response.json().then(errorData => {
                     showErrorMessage(errorData.message || 'Error al registrar el usuario.');
                 });