Skip to content

Commit

Permalink
feat: Endpoint baseURL 조정
Browse files Browse the repository at this point in the history
  • Loading branch information
ghis22130 committed May 12, 2021
1 parent cae8229 commit a4c9090
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
import Foundation

struct GameListDTO: Decodable {
private let games: [MatchUpDTO]
private let matchUpList: [MatchUpDTO]

func toDomain() -> [MatchUp] {
let matchUps = self.games.map { matchUpDTO in
let matchUps = self.matchUpList.map { matchUpDTO in
matchUpDTO.toDomain()
}
return matchUps
}

struct MatchUpDTO: Decodable {
private let gameId: Int
private let matchId: Int
private let home: String
private let away: String

func toDomain() -> MatchUp {
return .init(matchNumber: gameId, homeTeam: home, awayTeam: away)
return .init(matchNumber: matchId, homeTeam: home, awayTeam: away)
}
}
}
4 changes: 1 addition & 3 deletions Baseball/Baseball/Data/Network/NetworkEndpoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ protocol Requestable {
}

struct GameListEndpoint: Requestable {
// http://ec2-3-35-10-144.ap-northeast-2.compute.amazonaws.com/games
// var baseUrl = "http://3.35.226.74/"
var baseUrl = "http://ec2-3-35-10-144.ap-northeast-2.compute.amazonaws.com/"
var baseUrl = "http://3.35.226.74/"
var path = "games"
var httpMethod: HTTPMethod

Expand Down

0 comments on commit a4c9090

Please sign in to comment.