Compare commits

..

No commits in common. "d5e5e27ca37561b2242bb5114b4a4a9823e6b771" and "3e961e34a1a28f1a02bd547eec180ad51cb1ff38" have entirely different histories.

5 changed files with 5 additions and 1 deletions

View File

@ -18,6 +18,7 @@ const authchecker = async (action: Action, permissions: string | string[]) => {
try { try {
jwtPayload = <any>jwt.verify(provided_token, config.jwt_secret); jwtPayload = <any>jwt.verify(provided_token, config.jwt_secret);
} catch (error) { } catch (error) {
console.log(error);
throw new IllegalJWTError() throw new IllegalJWTError()
} }
const count = await getConnectionManager().get().getRepository(User).count({ id: jwtPayload["userdetails"]["id"], refreshTokenCount: jwtPayload["userdetails"]["refreshTokenCount"] }) const count = await getConnectionManager().get().getRepository(User).count({ id: jwtPayload["userdetails"]["id"], refreshTokenCount: jwtPayload["userdetails"]["refreshTokenCount"] })

View File

@ -27,6 +27,7 @@ export class RunnerController {
async getAll() { async getAll() {
let responseRunners: ResponseRunner[] = new Array<ResponseRunner>(); let responseRunners: ResponseRunner[] = new Array<ResponseRunner>();
const runners = await this.runnerRepository.find({ relations: ['scans', 'group'] }); const runners = await this.runnerRepository.find({ relations: ['scans', 'group'] });
console.log(runners);
runners.forEach(runner => { runners.forEach(runner => {
responseRunners.push(new ResponseRunner(runner)); responseRunners.push(new ResponseRunner(runner));
}); });

View File

@ -29,6 +29,7 @@ export class RunnerOrganisationController {
async getAll() { async getAll() {
let responseTeams: ResponseRunnerOrganisation[] = new Array<ResponseRunnerOrganisation>(); let responseTeams: ResponseRunnerOrganisation[] = new Array<ResponseRunnerOrganisation>();
const runners = await this.runnerOrganisationRepository.find({ relations: ['address', 'contact', 'teams'] }); const runners = await this.runnerOrganisationRepository.find({ relations: ['address', 'contact', 'teams'] });
console.log(runners);
runners.forEach(runner => { runners.forEach(runner => {
responseTeams.push(new ResponseRunnerOrganisation(runner)); responseTeams.push(new ResponseRunnerOrganisation(runner));
}); });

View File

@ -28,6 +28,7 @@ export class RunnerTeamController {
async getAll() { async getAll() {
let responseTeams: ResponseRunnerTeam[] = new Array<ResponseRunnerTeam>(); let responseTeams: ResponseRunnerTeam[] = new Array<ResponseRunnerTeam>();
const runners = await this.runnerTeamRepository.find({ relations: ['parentGroup', 'contact'] }); const runners = await this.runnerTeamRepository.find({ relations: ['parentGroup', 'contact'] });
console.log(runners);
runners.forEach(runner => { runners.forEach(runner => {
responseTeams.push(new ResponseRunnerTeam(runner)); responseTeams.push(new ResponseRunnerTeam(runner));
}); });

View File

@ -17,7 +17,7 @@ export abstract class CreateParticipant {
* Optional. * Optional.
*/ */
@IsString() @IsString()
@IsOptional() @IsNotEmpty()
middlename?: string; middlename?: string;
/** /**