Skip to content

Commit

Permalink
fix: correctly look for free time slots
Browse files Browse the repository at this point in the history
  • Loading branch information
kalkih committed Mar 19, 2024
1 parent 42e14bd commit 205442c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/services/bookingService/existingBookingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class ExistingBookingService extends BookingService {
const $ = cheerio.load(await res.text());

logger.debug(`Checking week of: ${getShortDate(date)}`);
const freeSlots = $(".timecell").not(".selected").children("script");
const freeSlots = $(".timecell").not(".selected").children("button");
const bookedSlots = $(".timecell label");

return [freeSlots, bookedSlots];
Expand Down
2 changes: 1 addition & 1 deletion src/services/bookingService/newBookingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class NewBookingService extends BookingService {
const $ = cheerio.load(await res.text());

logger.debug(`Checking week of: ${getShortDate(date)}`);
const freeSlots = $(".timecell script");
const freeSlots = $(".timecell button");
const bookedSlots = $(".timecell label");

return [freeSlots, bookedSlots];
Expand Down

0 comments on commit 205442c

Please sign in to comment.