refactor(user): reorganize imports and code structure
This commit is contained in:
parent
6c025cc8d2
commit
7bd06dee62
4 changed files with 22 additions and 20 deletions
|
@ -1,6 +1,5 @@
|
|||
import { Routes } from '@angular/router';
|
||||
import { LandingComponent } from './feature/landing/landing.component';
|
||||
import { HomeComponent } from './feature/home/home.component';
|
||||
import { authGuard } from './auth.guard';
|
||||
|
||||
export const routes: Routes = [
|
||||
|
@ -11,10 +10,10 @@ export const routes: Routes = [
|
|||
{
|
||||
path: 'login/success',
|
||||
loadComponent: () => import('./feature/login-success/login-success.component'),
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'home',
|
||||
component: HomeComponent,
|
||||
loadComponent: () => import('./feature/home/home.component'),
|
||||
canActivate: [authGuard],
|
||||
},
|
||||
];
|
||||
|
|
|
@ -31,6 +31,7 @@ export class UserService {
|
|||
if (user) {
|
||||
return user;
|
||||
}
|
||||
|
||||
return await this.createUser(userProfile.id ?? '', userProfile.username ?? '').toPromise();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue