Skip to content

Commit

Permalink
πŸ‘€ :: chore :: patch response type
Browse files Browse the repository at this point in the history
  • Loading branch information
12xii committed Dec 29, 2023
1 parent 5af88ce commit 5900dfb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/profile/profile.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ export class ProfileService {
const thisUser = await this.userEntity.findOneBy({ userID });
const thisStudent = await this.studentEntity.findOneBy({ userID });

let isOnline = 0;
let isOnline = false;

if (!thisUser || !thisStudent) throw new NotFoundException('μ‘΄μž¬ν•˜μ§€ μ•ŠλŠ” μœ μ €');
if(await this.redis.get(`${userID}AccessToken`)) isOnline = 1
if(await this.redis.get(`${userID}AccessToken`)) isOnline = true

return Object.assign(thisUser, thisStudent, {isOnline});
}
Expand Down Expand Up @@ -173,10 +173,10 @@ export class ProfileService {
const thisUser = await this.userEntity.findOneBy({ userID });
const thisTeacher = await this.teacherEntity.findOneBy({ userID });

let isOnline = 0;
let isOnline = false;

if (!thisUser || !thisTeacher) throw new NotFoundException('μ‘΄μž¬ν•˜μ§€ μ•ŠλŠ” μœ μ €');
if(await this.redis.get(`${userID}AccessToken`)) isOnline = 1
if(await this.redis.get(`${userID}AccessToken`)) isOnline = true

return Object.assign(thisUser, thisTeacher, {isOnline});
}
Expand Down

0 comments on commit 5900dfb

Please sign in to comment.