* Adds a middleware to every endpoint currently in the `HttpApi`. * * **Gotchas** * * Endpoints added after this method is called do not receive the middleware.
(
middleware: Context.Key<I, S>
)
| 100 | * Endpoints added after this method is called do not receive the middleware. |
| 101 | */ |
| 102 | middleware<I extends HttpApiMiddleware.AnyId, S>( |
| 103 | middleware: Context.Key<I, S> |
| 104 | ): HttpApi<Id, HttpApiGroup.AddMiddleware<Groups, I>> |
| 105 |