Skip to content

Commit

Permalink
#32 commenting some harmful code toward this aim
Browse files Browse the repository at this point in the history
this isn't working, but I'd rather leave it here to preserve the train
of thought.
  • Loading branch information
NiloCK committed Jan 7, 2019
1 parent edb8b7b commit 62eed72
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions src/components/UserRegistration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,26 +122,28 @@ export default class UserRegistration extends Vue {
}
private validateUsername() {
this.usernameValidationInProgress = true;
this.$refs.userNameTextField.loading = true;
try {
getUserDB(this.username).allDocs();
} catch (e) {
alert('no userdb!');
}
doesUserExist(this.username).then((exists) => {
if (exists) {
log('name is taken :(');
this.$refs.userNameTextField.error = true;
} else {
log('name is available');
this.$refs.userNameTextField.appendIcon = 'done';
}
this.usernameValidationInProgress = false;
});
this.$refs.userNameTextField.loading = false;
// the below does not work. Complaints of admin credentials.
// this.usernameValidationInProgress = true;
// this.$refs.userNameTextField.loading = true;
// try {
// getUserDB(this.username).allDocs();
// } catch (e) {
// alert('no userdb!');
// }
// doesUserExist(this.username).then((exists) => {
// if (exists) {
// log('name is taken :(');
// this.$refs.userNameTextField.error = true;
// } else {
// log('name is available');
// this.$refs.userNameTextField.appendIcon = 'done';
// }
// this.usernameValidationInProgress = false;
// });
// this.$refs.userNameTextField.loading = false;
}
private createUser() {
Expand Down

0 comments on commit 62eed72

Please sign in to comment.