Updating middleware for Event to populate the created, updated, and id field