codersforcauses / p2s-backend

p2s rugbyworks backend
MIT License
7 stars 0 forks source link

Session Auto Generation #166

Open Drewbi opened 5 years ago

Drewbi commented 5 years ago

When a program is created extra data is sent including what days the sessions are on and the time and coaches involved. In this format:

    "name": "Term2 2019",
    "school": "5d4808cae3ff8f20c3d22181",
    "days": [{
        "day": "Tuesday",
        "start": "15:00",
        "end": "17:00"
    },
    {
        "day": "Monday",
        "start": "14:00",
        "end": "16:00"
    }],
    "dates": {
        "start": "2019-08-27T00:00:00.000Z",
        "end": "2019-10-28T00:00:00.000Z"
    },
    "coaches": {
        "_id": "5d48090be3ff8f20c3d221c5"
    }
}

Fixes #121

noobling commented 5 years ago

Oh btw tests are important for vital stuff like validation will add examples when I have time