Skip to content

Commit

Permalink
Admin login routing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadsalem committed Oct 23, 2023
1 parent 0e56fb3 commit b6cf6c9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
5 changes: 4 additions & 1 deletion backend/src/admin/settings/settings.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,10 @@ export class SettingsController {

const prohibitedNames = [
'admin',
'api'
'api',
'notfound',
'shared',
'login',
];
const namesFiltered = [];
let prohibitedName = false;
Expand Down
5 changes: 0 additions & 5 deletions frontend/src/app/admin/admin.routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Routes, RouterModule } from '@angular/router';

import { DashboardComponent } from './dashboard/dashboard.component';
import { RootComponent } from './root/root.component';
import { LoginComponent } from './login/login.component';
import { AdminGuard } from './admin.guard';
import { UsersComponent } from './components/users/users.component';
import { MappingValuesComponent } from './components/mapping-values/mapping-values.component';
Expand All @@ -17,10 +16,6 @@ import { IndexesComponent } from './indexes/indexes.component';
import { IndexesDashboardComponent } from './indexes-dashboard/indexes-dashboard.component';

const routes: Routes = [
{
path: 'login',
component: LoginComponent,
},
{
path: 'admin',
component: RootComponent,
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/app/app.routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { IndexesComponent } from './admin/indexes/indexes.component';
import { NotfoundComponent } from './components/notfound/notfound.component';

const routes: Routes = [
{ path: '**', component: IndexesComponent },
{ path: 'notfound', component: IndexesComponent },
{ path: '**', component: NotfoundComponent },
{ path: 'notfound', component: NotfoundComponent },
];

@NgModule({
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/app/explorer/explorer.routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ExplorerComponent } from './explorer.component';
import { LoginComponent } from '../admin/login/login.component';

const routes: Routes = [
{ path: '', component: ExplorerComponent },
{ path: 'login', component: LoginComponent },
{ path: 'shared/:id', component: ExplorerComponent },
{ path: ':dashboard_name', component: ExplorerComponent },
{ path: ':dashboard_name/shared/:id', component: ExplorerComponent },
Expand Down

0 comments on commit b6cf6c9

Please sign in to comment.