Page MenuHomePhorge

No OneTemporary

Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js
index 7a742b3dcf..0c65ac5d83 100644
--- a/src/components/registration/registration.js
+++ b/src/components/registration/registration.js
@@ -1,68 +1,68 @@
import { validationMixin } from 'vuelidate'
import { required, sameAs } from 'vuelidate/lib/validators'
import { mapActions, mapState } from 'vuex'
const registration = {
mixins: [validationMixin],
data: () => ({
user: {
email: '',
fullname: '',
username: '',
password: '',
confirm: ''
},
captcha: {}
}),
validations: {
user: {
email: { required },
username: { required },
fullname: { required },
password: { required },
confirm: {
required,
sameAsPassword: sameAs('password')
}
}
},
created () {
if ((!this.registrationOpen && !this.token) || this.signedIn) {
this.$router.push('/main/all')
}
- this.getCaptcha().then(cpt => this.captcha = cpt)
+ this.getCaptcha().then(cpt => { this.captcha = cpt })
},
computed: {
token () { return this.$route.params.token },
...mapState({
registrationOpen: (state) => state.instance.registrationOpen,
signedIn: (state) => !!state.users.currentUser,
isPending: (state) => state.users.signUpPending,
serverValidationErrors: (state) => state.users.signUpErrors,
termsOfService: (state) => state.instance.tos
})
},
methods: {
...mapActions(['signUp', 'getCaptcha']),
async submit () {
this.user.nickname = this.user.username
this.user.token = this.token
- this.user.captcha_solution = this.captcha.solution;
- this.user.captcha_token = this.captcha.token;
+ this.user.captcha_solution = this.captcha.solution
+ this.user.captcha_token = this.captcha.token
this.$v.$touch()
if (!this.$v.$invalid) {
try {
await this.signUp(this.user)
this.$router.push('/main/friends')
} catch (error) {
console.warn('Registration failed: ' + error)
}
}
}
}
}
export default registration

File Metadata

Mime Type
text/x-diff
Expires
Fri, Oct 30, 8:12 AM (20 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1799856
Default Alt Text
(2 KB)

Event Timeline