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

Commit

Permalink
Merge pull request #706 from artsy/post-fix
Browse files Browse the repository at this point in the history
Update oauth call to use post
  • Loading branch information
ashfurrow authored Mar 8, 2019
2 parents 5d08938 + a71b591 commit 9da1071
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
upcoming:
- Fixes oauth call to be a post

releases:
- version: 5.9.3
Expand Down
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 9da1071

Please sign in to comment.