Magic mongoose middleware for express