parent
6434b4dfce
commit
46f9503543
@ -21,7 +21,7 @@ export class CreateRunnerOrganisation extends CreateRunnerGroup {
|
|||||||
*/
|
*/
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsBoolean()
|
@IsBoolean()
|
||||||
registrtionEnabled?: boolean = false;
|
registrationEnabled?: boolean = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new RunnerOrganisation entity from this.
|
* Creates a new RunnerOrganisation entity from this.
|
||||||
@ -34,7 +34,7 @@ export class CreateRunnerOrganisation extends CreateRunnerGroup {
|
|||||||
newRunnerOrganisation.address = this.address;
|
newRunnerOrganisation.address = this.address;
|
||||||
Address.validate(newRunnerOrganisation.address);
|
Address.validate(newRunnerOrganisation.address);
|
||||||
|
|
||||||
if (this.registrtionEnabled) {
|
if (this.registrationEnabled) {
|
||||||
newRunnerOrganisation.key = uuid.v4().toUpperCase();
|
newRunnerOrganisation.key = uuid.v4().toUpperCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ export class UpdateRunnerOrganisation extends CreateRunnerGroup {
|
|||||||
*/
|
*/
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
@IsBoolean()
|
@IsBoolean()
|
||||||
registrtionEnabled: boolean;
|
registrationEnabled: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates a provided RunnerOrganisation entity based on this.
|
* Updates a provided RunnerOrganisation entity based on this.
|
||||||
@ -41,7 +41,7 @@ export class UpdateRunnerOrganisation extends CreateRunnerGroup {
|
|||||||
else { organisation.address = this.address; }
|
else { organisation.address = this.address; }
|
||||||
Address.validate(organisation.address);
|
Address.validate(organisation.address);
|
||||||
|
|
||||||
if (this.registrtionEnabled) {
|
if (this.registrationEnabled) {
|
||||||
organisation.key = uuid.v4().toUpperCase();
|
organisation.key = uuid.v4().toUpperCase();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -46,7 +46,7 @@ export class ResponseRunnerOrganisation extends ResponseRunnerGroup {
|
|||||||
*/
|
*/
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsBoolean()
|
@IsBoolean()
|
||||||
registrtionEnabled?: boolean = true;
|
registrationEnabled?: boolean = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a ResponseRunnerOrganisation object from a runnerOrganisation.
|
* Creates a ResponseRunnerOrganisation object from a runnerOrganisation.
|
||||||
@ -56,7 +56,7 @@ export class ResponseRunnerOrganisation extends ResponseRunnerGroup {
|
|||||||
super(org);
|
super(org);
|
||||||
this.address = org.address;
|
this.address = org.address;
|
||||||
this.teams = org.teams;
|
this.teams = org.teams;
|
||||||
if (!org.key) { this.registrtionEnabled = false; }
|
if (!org.key) { this.registrationEnabled = false; }
|
||||||
else { this.registrationKey = Buffer.from(org.key).toString('base64'); }
|
else { this.registrationKey = Buffer.from(org.key).toString('base64'); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user