Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds missing overloaded get method with [PathComponent] for the path parameter in the RoutesBuilder #2198

Merged
merged 1 commit into from
Feb 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions Sources/Vapor/Routing/RoutesBuilder+Method.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ extension RoutesBuilder {
{
return self.on(.GET, path, use: closure)
}

@discardableResult
public func get<Response>(
_ path: [PathComponent],
use closure: @escaping (Request) throws -> Response
) -> Route
where Response: ResponseEncodable
{
return self.on(.GET, path, use: closure)
}

@discardableResult
public func post<Response>(
Expand Down