Skip to content

Commit

Permalink
feat(frontend): Find my courses as member
Browse files Browse the repository at this point in the history
  • Loading branch information
Clashsoft committed Oct 27, 2023
1 parent 5d19a14 commit 2ae9645
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/app/assignment/services/course.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ export class CourseService {

getOwn(): Observable<Course[]> {
return this.userService.getCurrent().pipe(
switchMap(user => user ? this.http.get<Course[]>(`${environment.assignmentsApiUrl}/courses`, {params: {createdBy: user.id!}}) : of([])),
switchMap(user => user ? this.http.get<Course[]>(`${environment.assignmentsApiUrl}/courses`, {
params: {
createdBy: user.id!,
members: [user.id!],
},
}) : of([])),
);
}
}

0 comments on commit 2ae9645

Please sign in to comment.