This commit is contained in:
Alexey 2020-02-29 17:38:13 +03:00
parent f9840388d8
commit c725b54d84
2 changed files with 2 additions and 11 deletions

View File

@ -55,7 +55,7 @@ export default {
}
},
computed: {
...mapState('user', ['name', 'handle', 'company']),
...mapState('user', ['name', 'handle', 'company', 'contributionIndex']),
...mapGetters('user', ['isLoggedIn', 'hasErrorName']),
title() {
if (this.status.type === 'is-danger' || !this.contributionIndex) {
@ -66,14 +66,6 @@ export default {
} else {
return `Please, specify your name and organization.`
}
},
contributionIndex: {
get() {
return this.$store.state.user.contributionIndex
},
set(value) {
this.$store.commit('user/SET_CONTRIBUTION_INDEX', value)
}
}
},
async mounted() {
@ -135,7 +127,7 @@ export default {
})
if (response.ok) {
const { id } = await response.json()
this.contributionIndex = id
this.$store.commit('user/SET_CONTRIBUTION_INDEX', id)
} else {
const error = await response.text()
this.status.msg = error

View File

@ -119,7 +119,6 @@ router.post('/authorize_contribution', async (req, res) => {
}
const contribution = await Contribution.findOne({ where: { token: req.body.token } })
console.log('contribution', contribution.dataValues.id)
if (!contribution) {
res.status(404).send('There is no such contribution')
return