MCPcopy Create free account
hub / github.com/OneSignal/onesignal-node-api / PromiseMiddlewareWrapper

Class PromiseMiddlewareWrapper

middleware.ts:28–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28export 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected