create the events controller to handle post request for events