Skip to content

Commit

Permalink
fix: fixed create user route
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis3797 committed Jul 4, 2024
1 parent d232357 commit 9aa3404
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions apps/api/src/controller/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,7 @@ export const createUser = async (
id,
username,
dispname: username,
email,
userToAchievement: {
createMany: {
data: userToAchievementsData
}
}
email
},
select: {
id: true,
Expand All @@ -161,6 +156,10 @@ export const createUser = async (
}
});

await prismaClient.userToAchievement.createMany({
data: userToAchievementsData
});

return res.status(httpStatus.CREATED).json({
success: true,
data: {
Expand Down

0 comments on commit 9aa3404

Please sign in to comment.