fix: user registration with email support
This commit is contained in:
@@ -41,6 +41,15 @@ export const UserService = {
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Get user by email
|
||||
*/
|
||||
async getUserByEmail(email: string) {
|
||||
return prisma.user.findUnique({
|
||||
where: { email }
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Create a new user with hashed password
|
||||
*/
|
||||
@@ -54,6 +63,7 @@ export const UserService = {
|
||||
data: {
|
||||
username,
|
||||
password: hashedPassword,
|
||||
email,
|
||||
avatarUrl,
|
||||
role: 'CREATOR',
|
||||
status: 'ACTIVE'
|
||||
|
||||
Reference in New Issue
Block a user