Skip to content

Commit 433c4e2

Browse files
committed
Explain what Express wrapper does
1 parent c368875 commit 433c4e2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/src/sources/Express.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ function createMiddleware(): Middleware {
2828
}
2929

3030
export class Express implements Wrapper {
31+
// Whenever app.get, app.post, etc. is called, we want to inject our middleware
32+
// So that runWithContext is called for every request
33+
// Whenever a MongoDB query is made, we want to inspect the filter
34+
// And cross-reference it with the user supplied data of the request
3135
private wrapRouteMethods(exports: unknown) {
3236
massWrap(
3337
// @ts-expect-error This is magic that TypeScript doesn't understand

0 commit comments

Comments
 (0)