parent
7f3358d284
commit
a7854fbe81
@ -1,5 +1,5 @@
|
|||||||
import * as argon2 from "argon2";
|
import * as argon2 from "argon2";
|
||||||
import { IsEmail, IsOptional, IsPhoneNumber, IsString, IsUUID } from 'class-validator';
|
import { IsEmail, IsOptional, IsPhoneNumber, IsString } from 'class-validator';
|
||||||
import { getConnectionManager } from 'typeorm';
|
import { getConnectionManager } from 'typeorm';
|
||||||
import * as uuid from 'uuid';
|
import * as uuid from 'uuid';
|
||||||
import { UserGroupNotFoundError, UsernameOrEmailNeededError } from '../../errors/UserErrors';
|
import { UserGroupNotFoundError, UsernameOrEmailNeededError } from '../../errors/UserErrors';
|
||||||
@ -26,8 +26,6 @@ export class CreateUser {
|
|||||||
email?: string;
|
email?: string;
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
groupId?: number[] | number
|
groupId?: number[] | number
|
||||||
@IsUUID("4")
|
|
||||||
uuid: string;
|
|
||||||
|
|
||||||
public async toUser(): Promise<User> {
|
public async toUser(): Promise<User> {
|
||||||
let newUser: User = new User();
|
let newUser: User = new User();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user