🐛 fix: change create user repository flow

Include preference creation when creating new user accounts
This commit is contained in:
Rafi Arrafif
2026-01-09 14:56:39 +07:00
parent 5bcdeae663
commit ade9008752
3 changed files with 12 additions and 7 deletions

View File

@ -7,7 +7,12 @@ export const createUserViaRegisterRepository = async (
) => {
try {
return await userModel.create({
data: payload,
data: {
...payload,
preference: {
create: {},
},
},
});
} catch (error) {
ErrorForwarder(error);