refactor: remove obsolete member management API module
This commit is contained in:
@@ -29,9 +29,9 @@ export default async function AttendancePage({
|
||||
const t = await getTranslations('courses');
|
||||
|
||||
const [course, sessions, participants] = await Promise.all([
|
||||
api.getCourse(courseId),
|
||||
api.getSessions(courseId),
|
||||
api.getParticipants(courseId),
|
||||
api.courses.getById(courseId),
|
||||
api.sessions.list(courseId),
|
||||
api.enrollment.listParticipants(courseId),
|
||||
]);
|
||||
|
||||
if (!course) return <AccountNotFound />;
|
||||
@@ -43,7 +43,7 @@ export default async function AttendancePage({
|
||||
: null);
|
||||
|
||||
const attendance = selectedSessionId
|
||||
? await api.getAttendance(selectedSessionId)
|
||||
? await api.attendance.getBySession(selectedSessionId)
|
||||
: [];
|
||||
|
||||
const attendanceMap = new Map(
|
||||
|
||||
@@ -25,7 +25,7 @@ export default async function EditCoursePage({ params }: PageProps) {
|
||||
if (!acct) return <AccountNotFound />;
|
||||
|
||||
const api = createCourseManagementApi(client);
|
||||
const course = await api.getCourse(courseId);
|
||||
const course = await api.courses.getById(courseId);
|
||||
if (!course) return <AccountNotFound />;
|
||||
|
||||
const c = course as Record<string, unknown>;
|
||||
|
||||
@@ -39,9 +39,9 @@ export default async function CourseDetailPage({ params }: PageProps) {
|
||||
const t = await getTranslations('courses');
|
||||
|
||||
const [course, participants, sessions] = await Promise.all([
|
||||
api.getCourse(courseId),
|
||||
api.getParticipants(courseId),
|
||||
api.getSessions(courseId),
|
||||
api.courses.getById(courseId),
|
||||
api.enrollment.listParticipants(courseId),
|
||||
api.sessions.list(courseId),
|
||||
]);
|
||||
|
||||
if (!course) return <AccountNotFound />;
|
||||
|
||||
@@ -40,8 +40,8 @@ export default async function ParticipantsPage({ params }: PageProps) {
|
||||
const t = await getTranslations('courses');
|
||||
|
||||
const [course, participants] = await Promise.all([
|
||||
api.getCourse(courseId),
|
||||
api.getParticipants(courseId),
|
||||
api.courses.getById(courseId),
|
||||
api.enrollment.listParticipants(courseId),
|
||||
]);
|
||||
|
||||
if (!course) return <AccountNotFound />;
|
||||
|
||||
Reference in New Issue
Block a user