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

Make `on()` public #1679

Merged
merged 2 commits into from May 16, 2018

Conversation

3 participants
@rafiki270
Copy link
Contributor

rafiki270 commented May 12, 2018

My custom router methods like the one below stopped working! I think this is pretty useful to be private :)

    @discardableResult public func options<T>(_ path: PathComponentsRepresentable..., use closure: @escaping (Request) throws -> T) -> Route<Responder> where T: ResponseEncodable {
        return self.on(.OPTIONS, at: path, use: closure)
    }

@rafiki270 rafiki270 requested a review from tanner0101 May 12, 2018

@tanner0101

This comment has been minimized.

Copy link
Member

tanner0101 commented May 15, 2018

Oops, this one that was recently added was supposed to be public: https://github.com/vapor/vapor/pull/1666/files. We should make that array accepting one public.

@tanner0101 tanner0101 self-assigned this May 15, 2018

Make `on()` public
My custom router methods like the one below stopped working! I think this is pretty useful to be private :)

```swift
    @discardableResult public func options<T>(_ path: PathComponentsRepresentable..., use closure: @escaping (Request) throws -> T) -> Route<Responder> where T: ResponseEncodable {
        return self.on(.OPTIONS, at: path, use: closure)
    }
```

@rafiki270 rafiki270 force-pushed the rafiki270-patch-1-1 branch from 3e89227 to 2de3b8d May 16, 2018

@rafiki270

This comment has been minimized.

Copy link
Contributor Author

rafiki270 commented May 16, 2018

@tanner0101

This comment has been minimized.

Copy link
Member

tanner0101 commented May 16, 2018

@rafiki270 can you also make this one public? I would do it myself but this PR is via fork not local branch.

@tanner0101 tanner0101 added this to the 3.0.3 milestone May 16, 2018

@rafiki270

This comment has been minimized.

Copy link
Contributor Author

rafiki270 commented May 16, 2018

@tanner0101

This comment has been minimized.

Copy link
Member

tanner0101 commented May 16, 2018

Thanks!

@rafiki270 rafiki270 merged commit 39b4d3f into master May 16, 2018

3 checks passed

ci/circleci: linux Your tests passed on CircleCI!
Details
ci/circleci: linux-api-template Your tests passed on CircleCI!
Details
ci/circleci: linux-release Your tests passed on CircleCI!
Details
@penny-coin

This comment has been minimized.

Copy link

penny-coin commented May 16, 2018

Hey @rafiki270, you just merged a pull request, have a coin!

You now have 90 coins.

@rafiki270 rafiki270 deleted the rafiki270-patch-1-1 branch May 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment