We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7e962cb + 0e546fe commit 5573d09Copy full SHA for 5573d09
src/services/apiService.ts
@@ -86,6 +86,17 @@ export class ApiService {
86
}
87
88
89
+ async fetchGradables(courseId: string, term: string): Promise<GradableResponse> {
90
+ try {
91
+ const url = `/api/${term}/${courseId}/gradeables`;
92
+ const response = await this.client.get<GradableResponse>(url);
93
+ return response.data;
94
+ } catch (error: any) {
95
+ console.error('Error fetching gradables:', error);
96
+ throw new Error(error.response?.data?.message || 'Failed to fetch gradables.');
97
+ }
98
99
+
100
/**
101
* Fetches all gradables (assignments) for a course.
102
* @param courseId - The course ID
0 commit comments