Skip to content

Commit

Permalink
fix/#337 코드리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
youz2me committed Aug 27, 2024
1 parent 6e380f6 commit 93656ff
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class PromiseViewController: BaseViewController {
// MARK: Property

private let viewModel: PromiseViewModel
private var promiseInfoViewController: PromiseInfoViewController
private var promiseReadyStatusViewController: ReadyStatusViewController
private var promiseTardyViewController: TardyViewController
private let promiseInfoViewController: PromiseInfoViewController
private let promiseReadyStatusViewController: ReadyStatusViewController
private let promiseTardyViewController: TardyViewController
private let exitViewController = CustomActionSheetController(kind: .exitPromise)
private let deleteViewController = CustomActionSheetController(kind: .deletePromise)
private let promisePageViewController = UIPageViewController(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PromiseInfoViewController: BaseViewController {
super.viewWillAppear(animated)

viewModel.fetchPromiseParticipantList()
viewModel.fetchPromiseInfo(promiseID: viewModel.promiseID)
viewModel.fetchPromiseInfo()
}


Expand Down
10 changes: 7 additions & 3 deletions KkuMulKum/Source/Promise/ViewModel/PromiseViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ extension PromiseViewModel {
}

/// 약속 상세 정보 조회 API 구현 함수
func fetchPromiseInfo(promiseID: Int) {
func fetchPromiseInfo() {
Task {
do {
let result = try await service.fetchPromiseInfo(with: promiseID)
Expand Down Expand Up @@ -341,7 +341,9 @@ extension PromiseViewModel {
do {
let result = try await service.deletePromise(promiseID: promiseID)

guard let success = result?.success, success == true else {
guard let success = result?.success,
success == true
else {
return
}

Expand All @@ -355,7 +357,9 @@ extension PromiseViewModel {
do {
let result = try await service.exitPromise(promiseID: promiseID)

guard let success = result?.success, success == true else {
guard let success = result?.success,
success == true
else {
return
}

Expand Down

0 comments on commit 93656ff

Please sign in to comment.