Skip to content

Commit

Permalink
fix(infra): remove hash and remove transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
ssupecial committed May 20, 2024
1 parent 54757ca commit f22fee7
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions apps/backend/apps/client/src/user/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,17 @@ export class UserService {
// pass
}

return await this.initializeUser(newSignUpDto)
const user: User = await this.createUser(newSignUpDto)
const CreateUserProfileData: CreateUserProfileData = {
userId: user.id,
realName: signUpDto.realName
}
await this.createUserProfile(CreateUserProfileData)
await this.registerUserToPublicGroup(user.id)

return user

// return await this.initializeUser(newSignUpDto)
}

async signUp(req: Request, signUpDto: SignUpDto) {
Expand Down Expand Up @@ -457,12 +467,12 @@ export class UserService {
}

async createUser(signUpDto: SignUpDto): Promise<User> {
const encryptedPassword = await hash(signUpDto.password)
// const encryptedPassword = await hash(signUpDto.password)

const user = await this.prisma.user.create({
data: {
username: signUpDto.username,
password: encryptedPassword,
password: signUpDto.password,
email: signUpDto.email
}
})
Expand Down

0 comments on commit f22fee7

Please sign in to comment.