Skip to content

Commit

Permalink
feat : main 풀 받으려고 커밋.
Browse files Browse the repository at this point in the history
  • Loading branch information
yeahzxnn committed Feb 16, 2024
1 parent c17ef6d commit feee1f0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ final class HomeViewController: UIViewController {
.disposed(by: disposeBag)
}


/// Binding Month Label
private func bindMonthLabel(output: HomeViewModel.Output) {
output.monthRelay
Expand Down
2 changes: 2 additions & 0 deletions On_off_iOS/On_off_iOS/Home/On/Worklog/Model/Worklog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ struct Worklog: Codable {
let content: String?
let isChecked: Bool?
let date: String?
let createdAt: String?

}

struct AddWorklog: Codable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ final class InsertWorkLogService {

/// Add Worklog
/// - Parameter Worklog: 추가할 log
/// - Returns: Worklog
func addWorklog(Worklog: AddWorklog) -> Observable<Bool> {
/// - Returns: worklog
func addWorklog(worklog: AddWorklog) -> Observable<Bool> {
let url = Domain.RESTAPI + WorklogPath.addWorklog.rawValue
let header = Header.header.getHeader()
print(url)

return Observable.create { observer in
AF.request(url,
method: .post,
parameters: Worklog,
parameters: worklog,
encoder: JSONParameterEncoder.default,
headers: header)
.validate(statusCode: 200..<201)
// .validate(statusCode: 200..<201)
.responseDecodable(of: Response<Worklog>.self) { response in
print(#function, response)
switch response.result {
Expand All @@ -36,7 +36,8 @@ final class InsertWorkLogService {
observer.onError(error)
}
}

print("\(worklog) 되고 있니?")
print("\(url)/제대로 나오렴...")
return Disposables.create()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ final class InsertWorkLogViewModel {
let Worklog: AddWorklog = AddWorklog(date: formatDate(date: Date()),
content: output.textRelay.value)
print(Worklog)
service.addWorklog(Worklog: Worklog)
service.addWorklog(worklog: Worklog)
.subscribe(onNext: { check in
if check {
output.successAddWorklogRelay.accept(check)
Expand Down
1 change: 1 addition & 0 deletions On_off_iOS/On_off_iOS/Launch/LaunchViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ final class LaunchViewController: UIViewController {

setupAnim()
finishAnimation()
// KeychainWrapper.delete(key: LoginKeyChain.refreshToken.rawValue)
}

/// Setup Lottie animation
Expand Down

0 comments on commit feee1f0

Please sign in to comment.