platform/lms-adm-fe release promotion snapshot

This commit is contained in:
2026-08-12 05:51:05 +00:00
parent 8e15589413
commit 7bf76c4265
7 changed files with 88 additions and 11 deletions
+2 -1
View File
@@ -49,8 +49,9 @@ type ChatThreadsPayload = {
data?: unknown[];
};
export async function listInstructorChatThreads(accessToken: string, week?: number): Promise<InstructorChatThread[]> {
export async function listInstructorChatThreads(accessToken: string, courseId: string, week?: number): Promise<InstructorChatThread[]> {
const params = new URLSearchParams();
if (courseId) params.set('courseId', courseId);
if (week) params.set('week', String(week));
const queryString = params.toString();
+17
View File
@@ -24,3 +24,20 @@ export async function listInstructorCourses(accessToken: string): Promise<{ cour
if (!response.ok) throw new Error(`강좌 목록을 불러오지 못했습니다. (${response.status})`);
return response.json() as Promise<{ courses: InstructorCourse[] }>;
}
export async function createInitialInstructorCourse(accessToken: string, title: string): Promise<{ course: InstructorCourse }> {
const response = await fetch(`${LMS_API_BASE_URL}/instructor/courses/initial`, {
method: 'POST',
headers: {
Authorization: `Bearer ${accessToken}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ title }),
});
if (!response.ok) {
const payload = await response.json().catch(() => null) as { message?: string } | null;
throw new Error(payload?.message || `강좌를 생성하지 못했습니다. (${response.status})`);
}
return response.json() as Promise<{ course: InstructorCourse }>;
}