Implement user-specific tutorial access and enhance authentication handling

This commit is contained in:
liosha84
2025-07-06 11:00:17 +03:00
parent 140de83d0a
commit 3fdb1b4640
18 changed files with 153 additions and 25 deletions
@@ -3,6 +3,9 @@ import {Tutorial} from '../../models/tutorial.model';
import {TutorialService} from '../../services/tutorial.service';
import {MatCard, MatCardContent, MatCardHeader} from '@angular/material/card';
import {MarkdownComponent} from 'ngx-markdown';
import {authInterceptorProviders} from '../../helpers/auth.interceptor';
import {HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
import {CustomHttpInterceptor} from '../../helpers/custom-http-interceptor';
@Component({
selector: 'app-tutorials.component',
@@ -14,7 +17,12 @@ import {MarkdownComponent} from 'ngx-markdown';
],
templateUrl: './tutorials.component.html',
styleUrl: './tutorials.component.scss',
schemas: [CUSTOM_ELEMENTS_SCHEMA]
schemas: [CUSTOM_ELEMENTS_SCHEMA],
providers: [authInterceptorProviders,{
provide: HTTP_INTERCEPTORS,
useClass: CustomHttpInterceptor,
multi: true
}],
})
export class TutorialsComponent {
tutorials?: Tutorial[];