fix build error for ci workflow

This commit is contained in:
Amruth Pillai
2025-07-03 15:40:09 +02:00
parent 4314912d5a
commit 4e91a2e2ef
3 changed files with 10 additions and 12 deletions

View File

@ -5,7 +5,5 @@
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cn\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"] ["cn\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
], ],
"i18n-ally.localesPaths": [ "i18n-ally.localesPaths": ["apps/client/src/locales"]
"apps/client/src/locales"
]
} }

View File

@ -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;
} }
} }

View File

@ -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