Skip to content

Commit b547cbc

Browse files
committed
๐Ÿ› fix: ์œ ์ € ๋ฐ์ฝ”๋ ˆ์ดํ„ฐ ์ค‘๋ณต ๋กœ๊ทธ์ธ ํ•ธ๋“ค๋ง
- ๊ธฐ์กด์— ์„ธ์…˜์— ์กด์žฌํ•˜์ง€ ์•Š๋Š”๊ฒฝ์šฐ Null์ด ์•„๋‹Œ ๋ฐ˜ํ™˜ ํ˜•์‹์— ๋งž์ถฐ null ๋ฐฐ์—ด์„ ๋ณด๋‚ด๋„๋ก ์„ค์ • Issue Resolved: #227
1 parent 21a5736 commit b547cbc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

โ€Žback/src/auth/service/auth.service.tsโ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ export class AuthService {
1212
this.redis = this.redisService.getOrThrow();
1313
}
1414

15-
async getUserIdFromSession(sid: string): Promise<[number, string] | null> {
15+
async getUserIdFromSession(sid: string): Promise<[number | null, string | null]> {
1616
const session = JSON.parse(await this.redis.get(`user:${sid}`));
17-
if (!session) return null;
17+
if (!session) return [null, null];
1818
const userId = session.id;
1919
const userLoginId = session.loginId;
20-
if (!userId || !userLoginId) return null;
20+
if (!userId || !userLoginId) return [null, null];
2121
return [userId, userLoginId];
2222
}
2323

0 commit comments

Comments
ย (0)