adjusted login and signup post operations to work with forms

added a jwt interceptor
This commit is contained in:
2020-07-30 17:14:45 +02:00
parent 48d620e878
commit 4f2c149f5a
14 changed files with 81 additions and 25 deletions

View File

@@ -4,7 +4,7 @@ import { Routes, RouterModule } from '@angular/router';
import { AppComponent } from './app.component';
import { AuthGuard } from './account/auth.guard';
import { LoginComponent } from './account/login/login.component';
import { RegisterComponent } from './account/register/register.component';
import { SignupComponent } from './account/signup/signup.component';
const gameModule = () => import('./game/game.module').then(x => x.GameModule);
@@ -13,7 +13,7 @@ const routes: Routes = [
{ path: '', component: AppComponent, canActivate: [AuthGuard] },
// { path: '', redirectTo: '/game', pathMatch: 'prefix', canActivate: [AuthGuard] },
{ path: 'login', component: LoginComponent },
{ path: 'register', component: RegisterComponent },
{ path: 'signup', component: SignupComponent },
{ path: 'game', loadChildren: gameModule, canActivate: [AuthGuard] },
{ path: '**', redirectTo: '' },
];