Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
idatt2106-2024-07
frontend
Commits
53d2191f
Commit
53d2191f
authored
11 months ago
by
VIktorGrev
Browse files
Options
Downloads
Patches
Plain Diff
fix: Fixing routing to home
parent
72188822
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#274966
failed
11 months ago
Stage: install_dependencies
Stage: lint
Stage: build_project
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/router/index.ts
+2
-2
2 additions, 2 deletions
src/router/index.ts
with
2 additions
and
2 deletions
src/router/index.ts
+
2
−
2
View file @
53d2191f
...
...
@@ -16,7 +16,7 @@ const routes = [
{
path
:
''
,
name
:
'
home
'
,
component
:
()
=>
import
(
'
../views/
Home
View.vue
'
),
component
:
()
=>
import
(
'
../views/
SavingGoalView/Roadmap
View.vue
'
),
},
{
path
:
'
news
'
,
...
...
@@ -137,7 +137,7 @@ router.beforeEach((to, from, next) => {
if
(
requiresAuth
&&
!
isAuthenticated
)
{
next
({
name
:
'
login
'
,
query
:
{
redirect
:
to
.
fullPath
}
});
}
else
if
(
requiresAdmin
&&
userRole
!==
'
admin
'
)
{
next
({
name
:
'
home
'
});
next
({
name
:
'
unauthorized
'
});
}
else
{
next
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment