Skip to content

Commit

Permalink
Merge pull request #20 from rafiki270/master
Browse files Browse the repository at this point in the history
readme update for the new code
  • Loading branch information
twof committed Sep 18, 2018
2 parents 59afa3a + 1da5eee commit 353706a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -14,7 +14,7 @@
Vapor Mailgun Service can be installed with Swift Package Manager

```swift
.package(url: "https://github.com/twof/VaporMailgunService.git", from: "1.1.0")
.package(url: "https://github.com/twof/VaporMailgunService.git", from: "1.5.0")
```

## Usage
Expand All @@ -31,7 +31,7 @@ let mailgun = Mailgun(apiKey: "<api key>", domain: "mg.example.com")
services.register(mailgun, as: Mailgun.self)
```

Note: If your private api key begins with `key-`, be sure to include it
> Note: If your private api key begins with `key-`, be sure to include it
### Use

Expand Down Expand Up @@ -84,7 +84,7 @@ public func boot(_ app: Application) throws {
// sets up a catch_all forward for the route listed
let routeSetup = RouteSetup(forwardURL: "http://example.com/mailgun/all", description: "A route for all emails")
let mailgunClient = try app.make(Mailgun.self)
try mailgunClient.setupForwarding(setup: routeSetup, with: app).map { (resp) in
try mailgunClient.setup(forwarding: routeSetup, with: app).map { (resp) in
print(resp)
}
}
Expand All @@ -99,7 +99,7 @@ mailgunGroup.post("all") { (req) -> Future<String> in
return "Hello"
}
} catch {
throw Abort(HTTPStatus.internalServerError, reason: "Could not decode incoming Mailgun")
throw Abort(HTTPStatus.internalServerError, reason: "Could not decode incoming message")
}
}
```

0 comments on commit 353706a

Please sign in to comment.