gymbox-bot icon indicating copy to clipboard operation
gymbox-bot copied to clipboard

Booking schedule failing if classesByDay.json include classes on consecutive days.

Open tmerlet opened this issue 5 years ago • 2 comments

If you try and book classes on consecutive days, for example:

{

    "Wednesday": {
      "className": "Bike & Beats",
      "time": "07:15",
      "location": "Holborn"      
    },
    "Thursday": {
      "className": "Ripped & Stripped",
      "time": "12:00",
      "location": "Farringdon"
    }
  } 
  1. On Tuesday: the bot successfully books Wednesdays' class.
  2. On Wednesday: the bot tries to book Wednesday's and Thursday's class. But as Wednesday was already booked on Tuesday, it fails and doesn't book Thursdays' class.

tmerlet avatar Sep 01 '19 18:09 tmerlet

I have a fix for this, if you can give me a push access ;) (or tell me how to send you the code)

tmerlet avatar Sep 01 '19 18:09 tmerlet

Hey @tmerlet feel free to submit a Pull Request with your fix (You should fork the repo and submit a PR from your forked repo master branch to this repo master branch)

alex3165 avatar Sep 09 '19 09:09 alex3165