---|qcm| Mise à jour du component 'QCM'
This commit is contained in:
@@ -1,5 +1,19 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { ApiService } from './api.service';
|
||||
import { QCM } from 'src/app/core/models';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class QCMService {
|
||||
|
||||
constructor(
|
||||
private apiService: ApiService
|
||||
) { }
|
||||
|
||||
get(type: string): Observable<QCM> {
|
||||
return this.apiService.get(`/qcm/${type}`)
|
||||
.pipe(map(data => data.qcm));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user