Skip to content

Commit

Permalink
Documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Jan 22, 2024
1 parent 287f865 commit 1e4ccb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Sources/Hummingbird/Router/Router.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ public final class HBRouter<Context: HBBaseRequestContext>: HBRouterMethods, HBR
}
}

/// build router
/// build responder from router
public func buildResponder() -> HBRouterResponder<Context> {
HBRouterResponder(context: Context.self, trie: self.trie.build(), notFoundResponder: self.middlewares.constructResponder(finalResponder: NotFoundResponder<Context>()))
}

/// Add path for closure returning type conforming to ResponseFutureEncodable
/// Add path for closure returning type conforming to HBResponseGenerator
@discardableResult public func on(
_ path: String,
method: HTTPRequest.Method,
Expand Down
12 changes: 6 additions & 6 deletions Sources/Hummingbird/Router/RouterMethods.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public protocol HBRouterMethods {
}

extension HBRouterMethods {
/// GET path for async closure returning type conforming to ResponseEncodable
/// GET path for async closure returning type conforming to HBResponseGenerator
@discardableResult public func get(
_ path: String = "",
options: HBRouterMethodOptions = [],
Expand All @@ -50,7 +50,7 @@ extension HBRouterMethods {
return on(path, method: .get, options: options, use: handler)
}

/// PUT path for async closure returning type conforming to ResponseEncodable
/// PUT path for async closure returning type conforming to HBResponseGenerator
@discardableResult public func put(
_ path: String = "",
options: HBRouterMethodOptions = [],
Expand All @@ -59,7 +59,7 @@ extension HBRouterMethods {
return on(path, method: .put, options: options, use: handler)
}

/// DELETE path for async closure returning type conforming to ResponseEncodable
/// DELETE path for async closure returning type conforming to HBResponseGenerator
@discardableResult public func delete(
_ path: String = "",
options: HBRouterMethodOptions = [],
Expand All @@ -68,7 +68,7 @@ extension HBRouterMethods {
return on(path, method: .delete, options: options, use: handler)
}

/// HEAD path for async closure returning type conforming to ResponseEncodable
/// HEAD path for async closure returning type conforming to HBResponseGenerator
@discardableResult public func head(
_ path: String = "",
options: HBRouterMethodOptions = [],
Expand All @@ -77,7 +77,7 @@ extension HBRouterMethods {
return on(path, method: .head, options: options, use: handler)
}

/// POST path for async closure returning type conforming to ResponseEncodable
/// POST path for async closure returning type conforming to HBResponseGenerator
@discardableResult public func post(
_ path: String = "",
options: HBRouterMethodOptions = [],
Expand All @@ -86,7 +86,7 @@ extension HBRouterMethods {
return on(path, method: .post, options: options, use: handler)
}

/// PATCH path for async closure returning type conforming to ResponseEncodable
/// PATCH path for async closure returning type conforming to HBResponseGenerator
@discardableResult public func patch(
_ path: String = "",
options: HBRouterMethodOptions = [],
Expand Down

0 comments on commit 1e4ccb1

Please sign in to comment.