mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-10 04:22:27 +10:00
fix build error for ci workflow
This commit is contained in:
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@ -5,7 +5,5 @@
|
|||||||
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
|
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
|
||||||
["cn\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
|
["cn\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
|
||||||
],
|
],
|
||||||
"i18n-ally.localesPaths": [
|
"i18n-ally.localesPaths": ["apps/client/src/locales"]
|
||||||
"apps/client/src/locales"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -98,7 +98,7 @@ export class AuthService {
|
|||||||
if (payload.isTwoFactorAuth) return user;
|
if (payload.isTwoFactorAuth) return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
async register(registerDto: RegisterDto) {
|
async register(registerDto: RegisterDto): Promise<UserWithSecrets> {
|
||||||
const hashedPassword = await this.hash(registerDto.password);
|
const hashedPassword = await this.hash(registerDto.password);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -115,7 +115,7 @@ export class AuthService {
|
|||||||
// Do not `await` this function, otherwise the user will have to wait for the email to be sent before the response is returned
|
// Do not `await` this function, otherwise the user will have to wait for the email to be sent before the response is returned
|
||||||
void this.sendVerificationEmail(user.email);
|
void this.sendVerificationEmail(user.email);
|
||||||
|
|
||||||
return user as UserWithSecrets;
|
return user;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof PrismaClientKnownRequestError && error.code === "P2002") {
|
if (error instanceof PrismaClientKnownRequestError && error.code === "P2002") {
|
||||||
throw new BadRequestException(ErrorMessage.UserAlreadyExists);
|
throw new BadRequestException(ErrorMessage.UserAlreadyExists);
|
||||||
@ -346,7 +346,7 @@ export class AuthService {
|
|||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
async useBackup2FACode(email: string, code: string) {
|
async useBackup2FACode(email: string, code: string): Promise<UserWithSecrets> {
|
||||||
const user = await this.userService.findOneByIdentifierOrThrow(email);
|
const user = await this.userService.findOneByIdentifierOrThrow(email);
|
||||||
|
|
||||||
// If the user doesn't have 2FA enabled, or does not have a 2FA secret set, throw an error
|
// If the user doesn't have 2FA enabled, or does not have a 2FA secret set, throw an error
|
||||||
@ -366,6 +366,6 @@ export class AuthService {
|
|||||||
secrets: { update: { twoFactorBackupCodes: backupCodes } },
|
secrets: { update: { twoFactorBackupCodes: backupCodes } },
|
||||||
});
|
});
|
||||||
|
|
||||||
return user as UserWithSecrets;
|
return user;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
onlyBuiltDependencies:
|
onlyBuiltDependencies:
|
||||||
- '@nestjs/core'
|
- "@nestjs/core"
|
||||||
- '@parcel/watcher'
|
- "@parcel/watcher"
|
||||||
- '@prisma/client'
|
- "@prisma/client"
|
||||||
- '@prisma/engines'
|
- "@prisma/engines"
|
||||||
- '@swc/core'
|
- "@swc/core"
|
||||||
- esbuild
|
- esbuild
|
||||||
- nx
|
- nx
|
||||||
- prisma
|
- prisma
|
||||||
|
|||||||
Reference in New Issue
Block a user