File tree Expand file tree Collapse file tree 3 files changed +450
-1
lines changed
Expand file tree Collapse file tree 3 files changed +450
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import RecoveryAluno from '../../views/aluno/Recovery.vue';
55import ValidateRecovery from '../../views/aluno/ValidateRecovery.vue' ;
66import HomeAluno from '../../views/aluno/Home.vue' ;
77import PerfilAluno from '../../views/aluno/Profile.vue' ;
8+ import PublicPerfilAluno from '../../views/aluno/PerfilAluno.vue' ;
89import Complete from '../../views/aluno/Complete.vue' ;
910import Rede from '../../views/aluno/Rede.vue' ;
1011import ConfigAluno from '../../views/aluno/Config.vue' ;
@@ -126,6 +127,14 @@ export const alunoRoutes = [
126127 ( await isAuthAluno ( ) ) ? next ( ) : next ( "/login" ) ;
127128 }
128129 } ,
130+ {
131+ path : "/aluno/colega/:rm" ,
132+ name : "PerfilColega" ,
133+ component : PublicPerfilAluno ,
134+ beforeEnter : async ( to , from , next ) => {
135+ ( await isAuthAluno ( ) ) ? next ( ) : next ( "/login" ) ;
136+ }
137+ } ,
129138 {
130139 path : "/config" ,
131140 name : "Config" ,
Original file line number Diff line number Diff line change @@ -24,7 +24,10 @@ export const sharedRoutes = [
2424 {
2525 path : "/aluno/profile/:rm" ,
2626 name : "PublicPerfilAluno" ,
27- component : PublicPerfilAluno
27+ component : PublicPerfilAluno ,
28+ beforeEnter : async ( to , from , next ) => {
29+ ( await isAuthAluno ( ) ) ? next ( `/aluno/colega/${ to . params . rm } ` ) : next ( ) ;
30+ }
2831 } ,
2932 {
3033 path : "/professor/profile/:name" ,
You can’t perform that action at this time.
0 commit comments