Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
post for oauth endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
sweir27 committed Mar 7, 2019
1 parent 5d08938 commit c2cc047
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Kiosk/App/Networking/ArtsyAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ enum ArtsyAPI {
case createUser(email: String, password: String, phone: String, postCode: String, name: String)

case bidderDetailsNotification(auctionID: String, identifier: String)

case lostPasswordNotification(email: String)
case findExistingEmailRegistration(email: String)
}
Expand Down Expand Up @@ -174,7 +174,7 @@ extension ArtsyAPI : TargetType, ArtsyAPIType {

case .activeAuctions:
return ["is_auction": true as AnyObject, "live": true as AnyObject, "size": 100]

default:
return nil
}
Expand All @@ -183,7 +183,7 @@ extension ArtsyAPI : TargetType, ArtsyAPIType {
var method: Moya.Method {
switch self {
case .lostPasswordNotification,
.createUser:
.createUser, .xAuth:
return .post
case .findExistingEmailRegistration:
return .head
Expand Down Expand Up @@ -211,7 +211,7 @@ extension ArtsyAPI : TargetType, ArtsyAPIType {

case .auctionListings:
return stubbedResponse("AuctionListings")

case .systemTime:
return stubbedResponse("SystemTime")

Expand Down Expand Up @@ -401,10 +401,10 @@ extension ArtsyAuthenticatedAPI: TargetType, ArtsyAPIType {

case .myBidPositionsForAuctionArtwork:
return stubbedResponse("MyBidPositionsForAuctionArtwork")

case .myBidPosition:
return stubbedResponse("MyBidPosition")

}
}

Expand All @@ -417,7 +417,7 @@ extension ArtsyAuthenticatedAPI: TargetType, ArtsyAPIType {

func stubbedResponse(_ filename: String) -> Data! {
@objc class TestClass: NSObject { }

let bundle = Bundle(for: TestClass.self)
let path = bundle.path(forResource: filename, ofType: "json")
return (try? Data(contentsOf: URL(fileURLWithPath: path!)))
Expand Down

0 comments on commit c2cc047

Please sign in to comment.