Skip to content

Commit

Permalink
add course dashboard service
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixTJDietrich committed May 10, 2024
1 parent 6b04271 commit 7634d3c
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import { StudentMetrics } from 'app/entities/student-metrics.model';

@Injectable({ providedIn: 'root' })
export class CourseDashboardService {
public resourceUrl = 'api/metrics';

constructor(private http: HttpClient) {}

getCourseMetricsForUser(courseId: number): Observable<HttpResponse<StudentMetrics>> {
return this.http.get<StudentMetrics>(`${this.resourceUrl}/course/${courseId}/student`, { observe: 'response' });
}
}

0 comments on commit 7634d3c

Please sign in to comment.