Skip to content

Commit 26b7ee0

Browse files
authored
Merge pull request #1 from amaljojo/patch-1
Create nwaccount.js
2 parents 3178b24 + c21f9ca commit 26b7ee0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

nwaccount.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const accSearch = document.getElementById('username').value;
2+
let avail = 'Account is NOT available to register';
3+
if (accSearch.length > 2) {
4+
const _account = await client.database.call('get_accounts', [
5+
[accSearch],
6+
]);
7+
console.log(`_account:`, _account, accSearch.length);
8+
9+
if (_account.length == 0) {
10+
avail = 'Account is available to register';
11+
}
12+
}
13+
document.getElementById('accInfo').innerHTML = avail;

0 commit comments

Comments
 (0)