Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mono424 committed Sep 30, 2023
1 parent 2e81910 commit 5e6b3ec
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions web/ts/api/admin-lecture-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,35 +236,35 @@ export const AdminLectureList = {
* @param request
*/
updateMetadata: async function (courseId: number, lectureId: number, request: UpdateLectureMetaRequest) {
const promises: (() => Promise<Response>)[] = [];
const promises: (() => Promise<Response>)[] = [];
if (request.name !== undefined) {
promises.push(
() => post(`/api/course/${courseId}/renameLecture/${lectureId}`, {
promises.push(() =>
post(`/api/course/${courseId}/renameLecture/${lectureId}`, {
name: request.name,
}),
);
}

if (request.description !== undefined) {
promises.push(
() => put(`/api/course/${courseId}/updateDescription/${lectureId}`, {
promises.push(() =>
put(`/api/course/${courseId}/updateDescription/${lectureId}`, {
name: request.description,
}),
);
}

if (request.lectureHallId !== undefined) {
promises.push(
() => post("/api/setLectureHall", {
promises.push(() =>
post("/api/setLectureHall", {
streamIds: [lectureId],
lectureHall: request.lectureHallId,
}),
);
}

if (request.isChatEnabled !== undefined) {
promises.push(
() => patch(`/api/stream/${lectureId}/chat/enabled`, {
promises.push(() =>
patch(`/api/stream/${lectureId}/chat/enabled`, {
lectureId,
isChatEnabled: request.isChatEnabled,
}),
Expand Down

0 comments on commit 5e6b3ec

Please sign in to comment.