refactor auth service
This commit is contained in:
1 parent
3611aee468
commit
a3e24b5420
16 files changed
+180
-32
No files matched your search
@@ -17,6 +17,11 @@ class MongoUserRepository implements IUserRepository {
|
||||
};
|
||||
};
|
||||
|
||||
create = async (userData: Partial<UserEntity>) => {
|
||||
const user = await User.create(userData);
|
||||
return this.toEntity(user);
|
||||
};
|
||||
|
||||
findByEmail = async (email: string) => {
|
||||
const user = await User.findOne({ email });
|
||||
if (!user) return null;
|
||||
|
||||
Reference in new issue
Block a user