refactor: remove unsed code

This commit is contained in:
Abdalhamid Alhamad
2025-08-11 15:15:41 +03:00
parent cff87c4ecd
commit e8ee74d0d7
172 changed files with 177 additions and 10911 deletions
+3 -3
View File
@@ -7,9 +7,9 @@ export class UserTokenService {
constructor(private readonly userTokenRepository: UserTokenRepository) {}
private readonly logger = new Logger(UserTokenService.name);
async generateToken(userId: string, userType: UserType, expiryDate?: Date): Promise<string> {
async generateToken(userId: string, expiryDate?: Date): Promise<string> {
this.logger.log(`Generating token for user ${userId}`);
const tokenEntity = await this.userTokenRepository.generateToken(userId, userType, expiryDate);
const tokenEntity = await this.userTokenRepository.generateToken(userId, expiryDate);
this.logger.log(`Token generated successfully for junior ${userId}`);
return tokenEntity.token;
}
@@ -29,7 +29,7 @@ export class UserTokenService {
}
this.logger.log(`Token validated successfully`);
return tokenEntity.juniorId! || tokenEntity.userId!;
return tokenEntity.userId!;
}
invalidateToken(token: string) {
+1 -1
View File
@@ -154,7 +154,7 @@ export class UserService {
isProfileCompleted: true,
});
const ONE_DAY = moment().add(1, 'day').toDate();
const token = await this.userTokenService.generateToken(user.id, UserType.CHECKER, ONE_DAY);
const token = await this.userTokenService.generateToken(user.id, ONE_DAY);
await this.sendCheckerAccountCreatedEmail(data.email, token);
return user;