1
0

Add link share password authentication (#466)

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/466
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
This commit is contained in:
konrad
2021-04-11 13:18:19 +00:00
parent fa35f7790a
commit 2d8c43a920
4 changed files with 121 additions and 26 deletions

View File

@ -151,10 +151,11 @@ export default {
ctx.commit(LOADING, false, {root: true})
})
},
linkShareAuth(ctx, hash) {
linkShareAuth(ctx, {hash, password}) {
const HTTP = HTTPFactory()
return HTTP.post('/shares/' + hash + '/auth')
return HTTP.post('/shares/' + hash + '/auth', {
password: password,
})
.then(r => {
localStorage.setItem('token', r.data.token)
ctx.dispatch('checkAuth')