Skip to content

Commit

Permalink
Bugfix (#1380)
Browse files Browse the repository at this point in the history
Co-authored-by: Luciano Jesus Lima <luciano@doutoraovivo.com.br>
  • Loading branch information
brazilianbytes and dav-luciano committed May 11, 2022
1 parent ebc0c9f commit af612bc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -808,10 +808,10 @@ We try to follow [Airbnb's JavaScript Style Guide](https://github.com/airbnb/jav
| :------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------: |
| [lteacher](https://github.com/lteacher) | [martinmicunda](https://github.com/martinmicunda) | [nori3tsu](https://github.com/nori3tsu) | [ppasmanik](https://github.com/ppasmanik) | [ryanzyy](https://github.com/ryanzyy) |

| [<img alt="m0ppers" src="https://avatars3.githubusercontent.com/u/819421?v=4&s=117" width="117">](https://github.com/m0ppers) | [<img alt="footballencarta" src="https://avatars0.githubusercontent.com/u/1312258?v=4&s=117" width="117">](https://github.com/footballencarta) | [<img alt="bryanvaz" src="https://avatars0.githubusercontent.com/u/9157498?v=4&s=117" width="117">](https://github.com/bryanvaz) | [<img alt="njyjn" src="https://avatars.githubusercontent.com/u/10694375?v=4&s=117" width="117">](https://github.com/njyjn) | |
| :---------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------: | ------------------------------------- |
| [m0ppers](https://github.com/m0ppers) | [footballencarta](https://github.com/footballencarta) | [bryanvaz](https://github.com/bryanvaz) | [njyjn](https://github.com/njyjn) | [kdybicz](https://github.com/kdybicz) |
| [<img alt="m0ppers" src="https://avatars3.githubusercontent.com/u/819421?v=4&s=117" width="117">](https://github.com/m0ppers) | [<img alt="footballencarta" src="https://avatars0.githubusercontent.com/u/1312258?v=4&s=117" width="117">](https://github.com/footballencarta) | [<img alt="bryanvaz" src="https://avatars0.githubusercontent.com/u/9157498?v=4&s=117" width="117">](https://github.com/bryanvaz) | [<img alt="njyjn" src="https://avatars.githubusercontent.com/u/10694375?v=4&s=117" width="117">](https://github.com/njyjn) | [<img alt="kdybicz" src="https://avatars.githubusercontent.com/u/13134892?v=4" width="117">](https://github.com/kdybicz) |
| :---------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------ |
| [m0ppers](https://github.com/m0ppers) | [footballencarta](https://github.com/footballencarta) | [bryanvaz](https://github.com/bryanvaz) | [njyjn](https://github.com/njyjn) | [kdybicz](https://github.com/kdybicz) |

| [<img alt="ericctsf" src="https://avatars.githubusercontent.com/u/42775388?s=400&v=4" width="117">](https://github.com/ericctsf) | | | | |
| :------------------------------------------------------------------------------------------------------------------------------: | :-: | :-: | :-: | :-: |
| [ericctsf](https://github.com/erictsf) | | | | |
| [<img alt="ericctsf" src="https://avatars.githubusercontent.com/u/42775388?v=4" width="117">](https://github.com/ericctsf) | [<img alt="brazilianbytes" src="https://avatars.githubusercontent.com/u/1900570?v=4" width="117">](https://github.com/brazilianbytes) |
| :------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------: |
| [ericctsf](https://github.com/erictsf) | [brazilianbytes](https://github.com/brazilianbytes) |
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"kobanyan (https://github.com/kobanyan)",
"Leonardo Alifraco (https://github.com/lalifraco-devspark)",
"Leonardo Medici (https://github.com/doclm)",
"Luciano Jesus Lima (https://github.com/brazilianbytes)",
"Luke Chavers (https://github.com/vmadman)",
"Manuel Böhm (https://github.com/boehmers)",
"Marc Campbell (https://github.com/marccampbell)",
Expand Down
10 changes: 9 additions & 1 deletion src/events/websocket/WebSocketClients.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,16 @@ export default class WebSocketClients {
}
}

const authorizerData = this.#webSocketAuthorizersCache.get(connectionId)
let authorizedEvent
if (authorizerData) {
authorizedEvent = event
authorizedEvent.requestContext.identity = authorizerData.identity
authorizedEvent.requestContext.authorizer = authorizerData.authorizer
}

const lambdaFunction = this.#lambda.get(route.functionKey)
lambdaFunction.setEvent(event)
lambdaFunction.setEvent(authorizedEvent || event)

try {
const { body } = await lambdaFunction.runHandler()
Expand Down

0 comments on commit af612bc

Please sign in to comment.