Skip to content

Commit

Permalink
debug: test 6
Browse files Browse the repository at this point in the history
  • Loading branch information
whiitex committed May 19, 2024
1 parent 04656b0 commit 0596a93
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion api/src/timeslots/timeslots.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository, LessThan, MoreThan, QueryRunner } from 'typeorm';
import { Repository, LessThan, MoreThan, QueryRunner, Not, In } from 'typeorm';
import { TimeSlot } from './timeslot.entity';
import {
RecruitmentSession,
Expand Down Expand Up @@ -185,6 +185,21 @@ export class TimeSlotsService {
);

const allMatches = await queryBuilder.getMany();
return this.timeSlotRepository.find({
relations: [
'availabilities',
'availabilities.user',
'recruitmentSession',
],
where: {
availabilities: {
state: AvailabilityState.Free,
user: {
role: Not(In([Role.Applicant, Role.None])),
},
},
},
});
return allMatches;

let goodTimeSlots: TimeSlot[] = [];
Expand Down

0 comments on commit 0596a93

Please sign in to comment.