Skip to content

Commit

Permalink
chore(teacher) : lectureId가 0일 때 요청 보내지 않기
Browse files Browse the repository at this point in the history
  • Loading branch information
BaekSeungHa committed Nov 15, 2023
1 parent 80fd5ba commit c83d6a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {

export interface AttendanceRepository {
attendanceLecture({ code, lectureId }: AttendLectureParam): Promise<Response>;
getAttendanceCode(lectureId: number): Promise<AttendanceCode>;
getAttendanceCode(lectureId: number): Promise<AttendanceCode | void>;
getAttendance({ lectureId, memberId }: AttendMemberParam): Promise<Response>;
postConfirmAttendance(param: ChangeAttendanceStatusParam): Promise<Response>;
deleteCancelAttdendance(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ class AttendanceRepositoryImpl implements AttendanceRepository {
return data;
}

public async getAttendanceCode(lectureId: number): Promise<AttendanceCode> {
const { data } = await apiClient.get(`/attendance/code/${lectureId}`);
return data;
public async getAttendanceCode(
lectureId: number
): Promise<AttendanceCode | void> {
if (lectureId !== 0) {
const { data } = await apiClient.get(`/attendance/code/${lectureId}`);
return data;
}
}

public async getAttendants(
Expand Down

2 comments on commit c83d6a2

@vercel
Copy link

@vercel vercel bot commented on c83d6a2 Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

admin-checkin – ./apps/admin

admin-checkin-git-main-checkins-projects.vercel.app
admin.checkin.dgsw.kr
admin-checkin-checkins-projects.vercel.app

@vercel
Copy link

@vercel vercel bot commented on c83d6a2 Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

teacher-checkin – ./apps/teacher

teacher-checkin-checkins-projects.vercel.app
teacher.checkin.dgsw.kr
teacher-checkin-git-main-checkins-projects.vercel.app

Please sign in to comment.