We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21a5736 commit b547cbcCopy full SHA for b547cbc
โback/src/auth/service/auth.service.tsโ
@@ -12,12 +12,12 @@ export class AuthService {
12
this.redis = this.redisService.getOrThrow();
13
}
14
15
- async getUserIdFromSession(sid: string): Promise<[number, string] | null> {
+ async getUserIdFromSession(sid: string): Promise<[number | null, string | null]> {
16
const session = JSON.parse(await this.redis.get(`user:${sid}`));
17
- if (!session) return null;
+ if (!session) return [null, null];
18
const userId = session.id;
19
const userLoginId = session.loginId;
20
- if (!userId || !userLoginId) return null;
+ if (!userId || !userLoginId) return [null, null];
21
return [userId, userLoginId];
22
23
0 commit comments