Update express middleware

Fixes it to support the latest changes to the API