File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ import { authorize } from '@thream/socketio-jwt';
22import { Server as HttpServer } from 'http' ;
33import { Server } from 'socket.io' ;
44
5- import { User } from '../api/user/userModel' ;
6- import { userService } from '../api/user/userService' ;
75import { env } from '../common/utils/envConfig' ;
86import roomsEvents from './roomsEvents' ;
97import {
@@ -29,11 +27,12 @@ export function connectSocket(server: HttpServer) {
2927 io . use (
3028 authorize ( {
3129 secret : env . JWT_SECRET ,
32- onAuthentication : async ( user : User ) => {
33- const res = await userService . findById ( user . id ) ;
34- if ( ! res ) throw new Error ( 'User not found' ) ;
35- return res . responseObject ;
36- } ,
30+ //TODO: mmmm, need a trx??
31+ // onAuthentication: async (reqUser: User) => {
32+ // const user = await userService.getById(reqUser.id);
33+ // if (!user) throw new Error('User not found');
34+ // return user;
35+ // },
3736 } )
3837 ) ;
3938 }
You can’t perform that action at this time.
0 commit comments