Update middleware.js

forgot a bracket