Users should not be able to Volunteer to past events.
In the Backened:
The POST / route in server/routes/volunteers.js should check for the event date, if it's greater than today then add the volunteer, else repond with a status code 500 and a message to reject the request with a message " Sorry, but you cannot volunteer to an expired event ".
In the Front-end:
Past events are already rendered but they get displayed at the bottom, disable the volunteer button and use a different background color, maybe use a dull color such as grey to visually indicate that the event is inactive.
This is description should be refined
Users should not be able to Volunteer to past events.
In the Backened:
POST /
route inserver/routes/volunteers.js
should check for the event date, if it's greater thantoday
then add the volunteer, else repond with a status code500
and a message to reject the request with a message " Sorry, but you cannot volunteer to an expired event ".In the Front-end: