-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Suppose we had some route configuration like:
func routes(_ app: Application) throws {
let unprotectedAPI = app.grouped("api")
let tokenProtectedAPI = unprotectedAPI
.grouped(Token.authenticator())
.grouped(UserModel.guardMiddleware())
try tokenProtectedAPI
.grouped("users")
.register(collection: UserController())
}How would we convert this to use a parser-backed router? This is generally useful for chaining on middlewares to specific route groups, i.e. if we wanted everything behind the api path to require token-based authentication.
Metadata
Metadata
Assignees
Labels
No labels