there is no callback in lib/middleware/api.js