Changeset 43c9090 for src/main/resources/static/js/authentication-shared.js
Legend:
- Unmodified
- Added
- Removed
-
src/main/resources/static/js/authentication-shared.js
r743de55 r43c9090 9 9 10 10 function phoneCheck(phone){ 11 const phonePattern = /^07\d -\d{3}-\d{3}$/;11 const phonePattern = /^07\d\d{3}\d{3}$/; 12 12 if (!phonePattern.test(phone)) { 13 13 return false; … … 32 32 return regex.test(password); 33 33 } 34 export async function verificationCheck(userData ) {34 export async function verificationCheck(userData,condition) { 35 35 if (!usernameCheck(userData.username)) { 36 36 alert("Invalid username"); … … 56 56 } 57 57 } 58 const response = await fetch(`/api/users/checkDifferentUser`, { 59 method: "POST", 60 headers: { 61 'Content-Type': 'application/json' 62 }, 63 body: JSON.stringify(userData) 64 }); 65 if (response.ok) { 66 return true; 67 } else { 68 return false; 58 if(condition!==false){ 59 const response = await fetch(`/api/users/checkDifferentUser`, { 60 method: "POST", 61 headers: { 62 'Content-Type': 'application/json' 63 }, 64 body: JSON.stringify(userData) 65 }); 66 if (response.ok) { 67 return true; 68 } else { 69 return false; 70 } 69 71 } 70 72 return true; 71 73 }
Note:
See TracChangeset
for help on using the changeset viewer.