Update API.md
This commit is contained in:
parent
9fc0436bf2
commit
79071b95c2
10
API.md
10
API.md
|
@ -146,16 +146,16 @@ module.exports.create = function (conf, deps, app) {
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
Special methods for `app`:
|
### Special methods for `app`:
|
||||||
--------------------------
|
|
||||||
|
|
||||||
### app.handlePromise(request, response, promise, message);
|
```
|
||||||
|
app.handlePromise(request, response, promise, message);
|
||||||
|
```
|
||||||
|
|
||||||
`handlePromise` will respond to the request with the result of `promise` as JSON.
|
`handlePromise` will respond to the request with the result of `promise` as JSON.
|
||||||
If there is an error, it will include `message` in order to help you debug.
|
If there is an error, it will include `message` in order to help you debug.
|
||||||
|
|
||||||
Special properties of `request`:
|
### Special properties of `request`:
|
||||||
--------------------------------
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
req.getSiteCapability(pkg) // Promises a capability on behalf of the current site (req.experienceId) without exposing secrets
|
req.getSiteCapability(pkg) // Promises a capability on behalf of the current site (req.experienceId) without exposing secrets
|
||||||
|
|
Loading…
Reference in New Issue