| @@ -84,7 +84,7 @@ export class UserController { | ||||
| 		if (oldUser.id != updateUser.id) { | ||||
| 			throw new UserIdsNotMatchingError(); | ||||
| 		} | ||||
| 		await this.userRepository.save(await updateUser.toUser(oldUser)); | ||||
| 		await this.userRepository.save(await updateUser.updateUser(oldUser)); | ||||
|  | ||||
| 		return new ResponseUser(await this.userRepository.findOne({ id: id }, { relations: ['permissions', 'groups'] })); | ||||
| 	} | ||||
|   | ||||
| @@ -85,7 +85,7 @@ export class UpdateUser { | ||||
|     /** | ||||
|      * Creates a User entity from this. | ||||
|      */ | ||||
|     public async toUser(user: User): Promise<User> { | ||||
|     public async updateUser(user: User): Promise<User> { | ||||
|         user.email = this.email; | ||||
|         user.username = this.username; | ||||
|         if (user.email === undefined && user.username === undefined) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user