Added signup route 👤

This commit is contained in:
Manik Maity
2024-11-07 21:08:08 +05:30
parent a3c5140bb4
commit 8741f40304
12 changed files with 1096 additions and 3 deletions

View File

@@ -0,0 +1,16 @@
import UserModel from "../models/user.model.js"
export const createUser = async (username, email, password) => {
try {
const createdUser = await UserModel.create({
username,
email,
password
})
return createdUser;
}
catch(err) {
throw err
}
}