fix(views): redirect to project after authenticating with a link share

This commit is contained in:
kolaente 2024-03-19 17:38:33 +01:00
parent fee75e55a3
commit d7b40f393e
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 3 additions and 4 deletions

View File

@ -6,7 +6,7 @@ import {UserFactory} from '../../factories/user'
import {ProjectFactory} from '../../factories/project'
import {prepareProjects} from './prepareProjects'
describe('Project View Project', () => {
describe('Project View List', () => {
createFakeUserAndLogin()
prepareProjects()

View File

@ -32,7 +32,7 @@ describe('Link shares', () => {
cy.get('.tasks')
.should('contain', tasks[0].title)
cy.url().should('contain', `/projects/${project.id}/list#share-auth-token=${share.hash}`)
cy.url().should('contain', `/projects/${project.id}/1#share-auth-token=${share.hash}`)
})
it('Should work when directly viewing a project with share hash present', () => {

View File

@ -106,10 +106,9 @@ function useAuth() {
}
return router.push({
name: 'project.view',
name: 'project.index',
params: {
projectId,
viewId: route.query.view,
},
hash,
})