-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from Jae-eun/webviewError
즐겨찾기 등록 & 웹뷰 에러 해결
- Loading branch information
Showing
7 changed files
with
105 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// FavoriteToon.swift | ||
// Toonie | ||
// | ||
// Created by 이재은 on 28/04/2019. | ||
// Copyright © 2019 Yapp. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
struct FavoriteToon: Codable { | ||
let success: Bool? | ||
let workListName: String? | ||
let workListInfo: String? | ||
let toonId: String? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// FavoriteService.swift | ||
// Toonie | ||
// | ||
// Created by 이재은 on 28/04/2019. | ||
// Copyright © 2019 Yapp. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
struct FavoriteService: Requestable { | ||
typealias NetworkData = FavoriteToon | ||
static let shared = FavoriteService() | ||
|
||
///선택한 툰 즐겨찾기 post 통신 | ||
func postFavoriteToon(params: [String: Any], | ||
completion: @escaping () -> Void) { | ||
post((API.myWorklist), | ||
params: params) { result in | ||
switch result { | ||
case .networkSuccess(let data): | ||
if data.resResult.success == false { | ||
return | ||
} | ||
completion() | ||
print("FavoriteToon post success") | ||
case .networkError(let error): | ||
print(error) | ||
case .networkFail: | ||
print("FavoriteToon post fail") | ||
} | ||
} | ||
} | ||
} |