Separate captcha into the backendInteractor
This commit is contained in:
parent
92de235f4e
commit
a525df32c9
4 changed files with 11 additions and 7 deletions
|
@ -31,12 +31,7 @@ const registration = {
|
|||
this.$router.push('/main/all')
|
||||
}
|
||||
|
||||
fetch("/api/pleroma/captcha")
|
||||
.then(resp => resp.json())
|
||||
.then(resp => {
|
||||
// TODO: check for errors
|
||||
this.captcha = resp
|
||||
})
|
||||
this.getCaptcha().then(cpt => this.captcha = cpt)
|
||||
},
|
||||
computed: {
|
||||
token () { return this.$route.params.token },
|
||||
|
@ -49,7 +44,7 @@ const registration = {
|
|||
})
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['signUp']),
|
||||
...mapActions(['signUp', 'getCaptcha']),
|
||||
async submit () {
|
||||
this.user.nickname = this.user.username
|
||||
this.user.token = this.token
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue