22 lines
592 B
Swift
22 lines
592 B
Swift
import Foundation
|
|||
|
|
import Infrastructure
|
||
|
|
|
||
|
|
public extension NotFoundMiddleware {
|
||
|
|
|
||
|
|
// MARK: Initializers
|
||
|
|
|
||
|
|
/// Creates a not-found middleware that renders the website's error page, localized to the module's String Catalog languages.
|
||
|
|
/// - Parameter assetVersion: the version token appended to the page's asset URLs, or `nil` (the default) to leave them unversioned.
|
||
|
|
init(
|
||
|
|
assetVersion: String? = nil
|
||
|
|
) {
|
||
|
|
self.init(bundle: .module) {
|
||
|
|
ErrorPage(
|
||
|
|
locale: $0,
|
||
|
|
assetVersion: assetVersion
|
||
|
|
)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|