be
This commit is contained in:
6
backend/dist/users/users.service.js
vendored
6
backend/dist/users/users.service.js
vendored
@@ -50,6 +50,12 @@ let UsersService = class UsersService {
|
||||
user.password = hashed;
|
||||
await this.repo.save(user);
|
||||
}
|
||||
async softDelete(userId) {
|
||||
const user = await this.repo.findOne({ where: { id: userId } });
|
||||
if (!user)
|
||||
throw new common_1.NotFoundException('User not found');
|
||||
await this.repo.softDelete(userId);
|
||||
}
|
||||
async findUserInfoByIdOrFail(id) {
|
||||
const user = await this.findById(id);
|
||||
if (!user)
|
||||
|
Reference in New Issue
Block a user