Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Make Future extension public
Browse files Browse the repository at this point in the history
  • Loading branch information
steffendsommer committed May 4, 2018
1 parent e9a5b67 commit 71f1daf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/Flash/flash.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public enum FlashType: String, Codable {
case warning
}

extension Response {
public extension Response {
public func flash(_ type: FlashType, _ message: String) -> Response {
if let container = try? privateContainer.make(FlashContainer.self) {
container.flashes.append(.init(type, message))
Expand All @@ -68,8 +68,8 @@ extension Response {
}
}

extension EventLoopFuture where T: Response {
func flash(_ type: FlashType, _ message: String) -> Future<Response> {
public extension EventLoopFuture where T: Response {
public func flash(_ type: FlashType, _ message: String) -> Future<Response> {
return self.map(to: Response.self) { res in
if let container = try? res.privateContainer.make(FlashContainer.self) {
container.flashes.append(.init(type, message))
Expand Down

0 comments on commit 71f1daf

Please sign in to comment.