Patch middleware api route

There was a small bug within the middleware.js file affecting all non anonymous API URLs exposed by plugins. If the query string parameter `branch` is missing, the request just terminates. For example, a plugin `my-plugin` that defines a route `helloworld`:
    
    GET /:org/:repo/api/my-plugin/helloworld **will hang**
    GET /:org/:repo/api/my-plugin/helloworld?branch=master **will not**

This was due to the use of `res.status()` method instead of `res.send()`