Skip to content

Commit 98b1978

Browse files
Merge pull request #98 from Daniel-Alvarenga/main
Add aluno profile page for aluno
2 parents 9b8319f + 27617af commit 98b1978

File tree

3 files changed

+450
-1
lines changed

3 files changed

+450
-1
lines changed

client/src/router/routes/aluno.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import RecoveryAluno from '../../views/aluno/Recovery.vue';
55
import ValidateRecovery from '../../views/aluno/ValidateRecovery.vue';
66
import HomeAluno from '../../views/aluno/Home.vue';
77
import PerfilAluno from '../../views/aluno/Profile.vue';
8+
import PublicPerfilAluno from '../../views/aluno/PerfilAluno.vue';
89
import Complete from '../../views/aluno/Complete.vue';
910
import Rede from '../../views/aluno/Rede.vue';
1011
import 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",

client/src/router/routes/shared.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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",

0 commit comments

Comments
 (0)