Skip to content

Commit efb3b00

Browse files
committed
fix: implementation query polluted
1 parent 58f8b15 commit efb3b00

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/helpers/withState.ts

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class withState {
1616
this.req.getState = this.getState.bind(this)
1717
this.req.getHeaders = this.getHeaders.bind(this)
1818
this.req.getQuery = this.getQuery.bind(this)
19+
this.req.getQueryPolluted = this.getQueryPolluted.bind(this)
1920
this.req.getParams = this.getParams.bind(this)
2021
this.req.getCookies = this.getCookies.bind(this)
2122
this.req.getBody = this.getBody.bind(this)
@@ -67,6 +68,11 @@ class withState {
6768
return getterObject(this.req.query, path, defaultValue)
6869
}
6970

71+
getQueryPolluted(path?: any, defaultValue?: any): any {
72+
// @ts-ignore
73+
return getterObject(this.req.queryPolluted, path, defaultValue)
74+
}
75+
7076
getParams(path?: any, defaultValue?: any): any {
7177
return getterObject(this.req.params, path, defaultValue)
7278
}

0 commit comments

Comments
 (0)