style(frontend): naming authService in router index duidelijker gemaakt
This commit is contained in:
		
							parent
							
								
									abefddebe2
								
							
						
					
					
						commit
						7f1ec2a4bb
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -9,7 +9,7 @@ import CreateDiscussion from "@/views/discussions/CreateDiscussion.vue"; | |||
| import CallbackPage from "@/views/CallbackPage.vue"; | ||||
| import UserClasses from "@/views/classes/UserClasses.vue"; | ||||
| import UserAssignments from "@/views/classes/UserAssignments.vue"; | ||||
| import authState from "@/services/auth/auth-service.ts"; | ||||
| import authService from "@/services/auth/auth-service.ts"; | ||||
| import LearningPathPage from "@/views/learning-paths/LearningPathPage.vue"; | ||||
| import LearningPathSearchPage from "@/views/learning-paths/LearningPathSearchPage.vue"; | ||||
| import UserHomePage from "@/views/homepage/UserHomePage.vue"; | ||||
|  | @ -145,7 +145,7 @@ const router = createRouter({ | |||
| router.beforeEach(async (to, _from, next) => { | ||||
|     // Verify if user is logged in before accessing certain routes
 | ||||
|     if (to.meta.requiresAuth) { | ||||
|         if (!authState.isLoggedIn.value) { | ||||
|         if (!authService.isLoggedIn.value) { | ||||
|             next("/login"); | ||||
|         } else { | ||||
|             next(); | ||||
|  |  | |||
		Reference in a new issue
	
	 Gerald Schmittinger
						Gerald Schmittinger