fix: fix a problem which make disableMsgpack not work

pull/249/head
moonrailgun 1 year ago
parent 22656c64ef
commit 61184d1e59

@ -59,6 +59,11 @@ interface TcSocketIOServiceOptions {
* token * token
*/ */
userAuth: (token: string) => Promise<UserJWTPayload>; userAuth: (token: string) => Promise<UserJWTPayload>;
/**
* msgpack
*/
disableMsgpack?: boolean;
} }
/** /**
@ -541,7 +546,7 @@ export const TcSocketIOService = (
origin: '*', origin: '*',
methods: ['GET', 'POST'], methods: ['GET', 'POST'],
}, },
parser: msgpackParser, parser: options.disableMsgpack ? undefined : msgpackParser,
}); });
if ( if (

@ -42,6 +42,7 @@ export default class ApiService extends TcService {
return user; return user;
}, },
disableMsgpack: config.feature.disableMsgpack,
}) })
); );
this.registerMixin(TcHealth()); this.registerMixin(TcHealth());

Loading…
Cancel
Save