diff options
| author | Ekaterina Vaartis <vaartis@cock.li> | 2018-12-16 20:53:41 +0300 |
|---|---|---|
| committer | Ekaterina Vaartis <vaartis@cock.li> | 2018-12-16 20:53:41 +0300 |
| commit | a525df32c9bbba873ecca2939b013985c51d27bc (patch) | |
| tree | ca09ae8e2a394d7b74b1e6f0eaf32eb54fbcb26c /src/components/registration/registration.js | |
| parent | 92de235f4e15f7cd69e150e07d5251305a3c251c (diff) | |
Separate captcha into the backendInteractor
Diffstat (limited to 'src/components/registration/registration.js')
| -rw-r--r-- | src/components/registration/registration.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js index c4e96b3c..7a742b3d 100644 --- a/src/components/registration/registration.js +++ b/src/components/registration/registration.js @@ -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 |
