mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-12 07:43:10 +10:00
ci: attempt to fix ci scripts by not importing prisma as type
This commit is contained in:
@ -8,7 +8,7 @@ import {
|
||||
import { ConfigService } from "@nestjs/config";
|
||||
import { JwtService } from "@nestjs/jwt";
|
||||
import { PrismaClientKnownRequestError } from "@prisma/client/runtime/library";
|
||||
import { AuthProvidersDto, LoginDto, RegisterDto } from "@reactive-resume/dto";
|
||||
import { AuthProvidersDto, LoginDto, RegisterDto, UserWithSecrets } from "@reactive-resume/dto";
|
||||
import { ErrorMessage } from "@reactive-resume/utils";
|
||||
import * as bcryptjs from "bcryptjs";
|
||||
import { randomBytes } from "crypto";
|
||||
@ -110,7 +110,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
|
||||
this.sendVerificationEmail(user.email);
|
||||
|
||||
return user;
|
||||
return user as UserWithSecrets;
|
||||
} catch (error) {
|
||||
if (error instanceof PrismaClientKnownRequestError && error.code === "P2002") {
|
||||
throw new BadRequestException(ErrorMessage.UserAlreadyExists);
|
||||
@ -341,6 +341,6 @@ export class AuthService {
|
||||
secrets: { update: { twoFactorBackupCodes: backupCodes } },
|
||||
});
|
||||
|
||||
return user;
|
||||
return user as UserWithSecrets;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user