Skip to content

Commit

Permalink
Update for the Vapor 4 official tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewangeta committed Apr 10, 2020
1 parent 467c6da commit b74bae1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let package = Package(
.library(name: "Stripe", targets: ["Stripe"])
],
dependencies: [
.package(url: "https://github.com/vapor/vapor.git", from: "4.0.0-rc.1"),
.package(url: "https://github.com/vapor/vapor.git", from: "4.0.0"),
.package(url: "https://github.com/vapor-community/stripe-kit.git", from: "6.1.0"),
],
targets: [
Expand Down
4 changes: 2 additions & 2 deletions Sources/Stripe/Stripe+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extension Application {
guard let stripeKey = Environment.get("STRIPE_API_KEY") else {
fatalError("STRIPE_API_KEY env var required")
}
return .init(httpClient: self.client.http,
return .init(httpClient: self.http.client.shared,
eventLoop: self.eventLoopGroup.next(),
apiKey: stripeKey)
}
Expand All @@ -30,7 +30,7 @@ extension Request {
guard let stripeKey = Environment.get("STRIPE_API_KEY") else {
fatalError("STRIPE_API_KEY env var required")
}
let new = StripeClient(httpClient: self.application.client.http,
let new = StripeClient(httpClient: self.application.http.client.shared,
eventLoop: self.eventLoop,
apiKey: stripeKey)
self.application.storage[StripeKey.self] = new
Expand Down

0 comments on commit b74bae1

Please sign in to comment.