Compare commits
No commits in common. "a16c4c564a5c81fbe46326591ca574c09069fcee" and "2f7b0d5606de7daa168d6db4f081df4169641e87" have entirely different histories.
a16c4c564a
...
2f7b0d5606
@ -62,7 +62,7 @@ export class UserController {
|
||||
}
|
||||
|
||||
user = await this.userRepository.save(user)
|
||||
return new ResponseUser(await this.userRepository.findOne({ id: user.id }, { relations: ['permissions', 'groups'] }));
|
||||
return new ResponseUser(await this.userRepository.findOne(user, { relations: ['permissions', 'groups'] }));
|
||||
}
|
||||
|
||||
@Put('/:id')
|
||||
|
@ -1,5 +1,5 @@
|
||||
import * as argon2 from "argon2";
|
||||
import { IsBoolean, IsEmail, IsOptional, IsPhoneNumber, IsString } from 'class-validator';
|
||||
import { IsEmail, IsOptional, IsPhoneNumber, IsString } from 'class-validator';
|
||||
import { getConnectionManager } from 'typeorm';
|
||||
import * as uuid from 'uuid';
|
||||
import { config } from '../../config';
|
||||
@ -63,14 +63,6 @@ export class CreateUser {
|
||||
@IsString()
|
||||
password: string;
|
||||
|
||||
/**
|
||||
* Will the new user be enabled from the start?
|
||||
* Default: true
|
||||
*/
|
||||
@IsBoolean()
|
||||
@IsOptional()
|
||||
enabled?: boolean = true;
|
||||
|
||||
/**
|
||||
* The new user's groups' id(s).
|
||||
* You can provide either one groupId or an array of groupIDs.
|
||||
@ -99,7 +91,6 @@ export class CreateUser {
|
||||
newUser.phone = this.phone
|
||||
newUser.password = await argon2.hash(this.password + newUser.uuid);
|
||||
newUser.groups = await this.getGroups();
|
||||
newUser.enabled = this.enabled;
|
||||
//TODO: ProfilePics
|
||||
|
||||
return newUser;
|
||||
|
Loading…
x
Reference in New Issue
Block a user