| 26 | } |
| 27 | |
| 28 | export class PromiseMiddlewareWrapper implements Middleware { |
| 29 | |
| 30 | public constructor(private middleware: PromiseMiddleware) { |
| 31 | |
| 32 | } |
| 33 | |
| 34 | pre(context: RequestContext): Observable<RequestContext> { |
| 35 | return from(this.middleware.pre(context)); |
| 36 | } |
| 37 | |
| 38 | post(context: ResponseContext): Observable<ResponseContext> { |
| 39 | return from(this.middleware.post(context)); |
| 40 | } |
| 41 | |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Defines the contract for a middleware intercepting requests before |
nothing calls this directly
no outgoing calls
no test coverage detected