[DEV] all work well

This commit is contained in:
Edouard DUPIN 2024-04-07 17:08:43 +02:00
parent 2402fc31ed
commit 95e2e03686

View File

@ -29,12 +29,12 @@ const routes: Routes = [
{ {
path: 'home', path: 'home',
component: HomeScene, component: HomeScene,
// canActivate: [OnlyUsersGuardHome], // this route to unregistered path when not logged ==> permit to simplify display canActivate: [OnlyUsersGuardHome], // this route to unregistered path when not logged ==> permit to simplify display
}, },
{ {
path: 'unregistered', path: 'unregistered',
component: HomeOutScene, component: HomeOutScene,
// canActivate: [OnlyUnregisteredGuardHome], // jump to the home when registered canActivate: [OnlyUnregisteredGuardHome], // jump to the home when registered
}, },
// ------------------------------------ // ------------------------------------
// -- SSO Generic interface // -- SSO Generic interface
@ -55,7 +55,7 @@ const routes: Routes = [
{ {
path: 'upload', path: 'upload',
component: UploadScene, component: UploadScene,
// canActivate: [OnlyAdminGuard], canActivate: [OnlyAdminGuard],
}, },
// ------------------------------------ // ------------------------------------
// -- gender: // -- gender:
@ -64,13 +64,13 @@ const routes: Routes = [
{ {
path: 'gender', path: 'gender',
component: GenderScene, component: GenderScene,
// canActivate: [OnlyUsersGuard], canActivate: [OnlyUsersGuard],
}, },
// display all (artist | album | traks) // display all (artist | album | tracks)
{ {
path: 'gender/:genderId', path: 'gender/:genderId',
component: GenderScene, component: GenderScene,
// canActivate: [OnlyUsersGuard], canActivate: [OnlyUsersGuard],
}, },
//{ path: 'gender-edit/:genderId', component: GenderEditScene }, //{ path: 'gender-edit/:genderId', component: GenderEditScene },
@ -83,12 +83,12 @@ const routes: Routes = [
{ {
path: 'playlist', path: 'playlist',
component: PlaylistScene, component: PlaylistScene,
// canActivate: [OnlyUsersGuard], canActivate: [OnlyUsersGuard],
}, },
{ {
path: 'playlist/:playlistId', path: 'playlist/:playlistId',
component: PlaylistScene, component: PlaylistScene,
// canActivate: [OnlyUsersGuard], canActivate: [OnlyUsersGuard],
}, },
//{ path: 'playlist-edit/:playlistId', component: PlaylistEditScene }, //{ path: 'playlist-edit/:playlistId', component: PlaylistEditScene },
@ -100,23 +100,23 @@ const routes: Routes = [
{ {
path: 'artist', path: 'artist',
component: ArtistsScene, component: ArtistsScene,
// canActivate: [OnlyUsersGuard], canActivate: [OnlyUsersGuard],
}, },
// display list af all artist with a specific gender // display list af all artist with a specific gender
{ {
path: 'artist/:artistId', path: 'artist/:artistId',
component: ArtistScene, component: ArtistScene,
// canActivate: [OnlyUsersGuard], canActivate: [OnlyUsersGuard],
}, },
{ {
path: 'artist/:artistId/edit', path: 'artist/:artistId/edit',
component: ArtistEditScene, component: ArtistEditScene,
// canActivate: [OnlyAdminGuard], canActivate: [OnlyAdminGuard],
}, },
{ {
path: 'artist/:artistId/:albumId', path: 'artist/:artistId/:albumId',
component: ArtistAlbumScene, component: ArtistAlbumScene,
// canActivate: [OnlyUsersGuard], canActivate: [OnlyUsersGuard],
}, },
// ------------------------------------ // ------------------------------------
@ -126,17 +126,17 @@ const routes: Routes = [
{ {
path: 'album', path: 'album',
component: AlbumsScene, component: AlbumsScene,
// canActivate: [OnlyUsersGuard], canActivate: [OnlyUsersGuard],
}, },
{ {
path: 'album/:albumId/edit', path: 'album/:albumId/edit',
component: AlbumEditScene, component: AlbumEditScene,
// canActivate: [OnlyAdminGuard], canActivate: [OnlyAdminGuard],
}, },
{ {
path: 'album/:albumId', path: 'album/:albumId',
component: AlbumScene, component: AlbumScene,
// canActivate: [OnlyUsersGuard], canActivate: [OnlyUsersGuard],
}, },
// ------------------------------------ // ------------------------------------
@ -145,12 +145,12 @@ const routes: Routes = [
{ {
path: 'track/:trackId/edit', path: 'track/:trackId/edit',
component: TrackEditScene, component: TrackEditScene,
// canActivate: [OnlyAdminGuard], canActivate: [OnlyAdminGuard],
}, },
{ {
path: 'track/:genderId/:artistId/:albumId/:trackId', path: 'track/:genderId/:artistId/:albumId/:trackId',
component: TrackScene, component: TrackScene,
// canActivate: [OnlyUsersGuard], canActivate: [OnlyUsersGuard],
}, },
// ------------------------------------ // ------------------------------------
@ -159,7 +159,7 @@ const routes: Routes = [
{ {
path: 'settings', path: 'settings',
component: SettingsScene, component: SettingsScene,
// canActivate: [OnlyUsersGuard], canActivate: [OnlyUsersGuard],
}, },
{ {
path: '**', path: '**',
@ -181,5 +181,4 @@ const routes: Routes = [
] ]
}) })
export class AppRoutingModule { } export class AppRoutingModule { }
// export const routing: ModuleWithProviders = RouterModule.forRoot(routes);