Skip to content

Commit

Permalink
Fix alert not showing for invalid semester(vacancy)
Browse files Browse the repository at this point in the history
  • Loading branch information
peng-u-0807 committed Dec 26, 2023
1 parent 13e2feb commit 2a5223e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SNUTT-2022/SNUTT/ViewModels/LectureDetailViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ extension LectureDetailScene {
func addVacancyLecture(lecture: Lecture) async {
do {
try await services.vacancyService.addLecture(lecture: lecture)
} catch let error as STError where error.code == .INVALID_SEMESTER_FOR_VACANCY_NOTIFICATION {
isErrorAlertPresented = true
errorTitle = error.title
errorMessage = error.content
} catch {
services.globalUIService.presentErrorAlert(error: error)
}
Expand Down

0 comments on commit 2a5223e

Please sign in to comment.