Skip to content

Commit

Permalink
fix: possible fix for socket.io res error
Browse files Browse the repository at this point in the history
  • Loading branch information
voximity committed Dec 19, 2023
1 parent 9dfda53 commit 178ee61
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "omegga",
"version": "1.0.39",
"version": "1.0.40",
"description": "Brickadia server installer, manager, wrapper, configurator, and automator",
"engines": {
"node": ">=20.0.0"
Expand Down Expand Up @@ -109,4 +109,4 @@
"url": "https://github.com/brickadia-community/omegga/issues"
},
"homepage": "https://github.com/brickadia-community/omegga#readme"
}
}
2 changes: 1 addition & 1 deletion src/webserver/backend/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export default class Webserver {
// use the session middleware
this.io.use((socket, next) => {
const req = socket.request as express.Request;
const res = req.res as express.Response<any, { userId: string }>;
const res = (req.res || {}) as express.Response<any, { userId: string }>;

session(req, res, async () => {
// check if user is authenticated
Expand Down

0 comments on commit 178ee61

Please sign in to comment.