Skip to content

Commit 84f1092

Browse files
authored
Fix error in doc (#597)
The doc of 'callingParams' was incorrect. (Not sur of how I rebuild this)
1 parent aa4875b commit 84f1092

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

docs/utilities.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@ Build `params` for a service call.
1111
- **Arguments**
1212

1313
- `{Object} options`
14-
- `{Object} context`
1514

1615
| Argument | Type | Default | Description |
1716
| --------- | :------: | ------- | ----------------------------------------------------------- |
1817
| `options` | `Object` | | How to construct params for service call. |
19-
| `context` | `Object` | | The `context` of the hook which will make the service call. |
2018

2119
| `options` | Argument | Type | Default | Description |
2220
| ---------------- | ----------------- | :--: | ---------------------------------------------------------------------------------------------------------------------------- | ----------- |
@@ -25,10 +23,21 @@ Build `params` for a service call.
2523
| `newProps` | `Object` | `{}` | Additional props to add to the new params. |
2624
| `hooksToDisable` | `Array< String >` | `[]` | The names of hooks to disable during the service call. `populate`, `fastJoin`, `softDelete` and `stashBefore` are supported. |
2725
| `ignoreDefaults` | `Boolean` | | Ignore the defaults `propNames` and `newProps`. |
28-
2926
- **Returns**
3027

31-
- `{Object} newParams`
28+
- `{Function}`
29+
30+
- **Arguments**
31+
32+
- `{Object} context`
33+
34+
| Argument | Type | Default | Description |
35+
| --------- | :------: | ------- | ----------------------------------------------------------- |
36+
| `context` | `Object` | | The `context` of the hook which will make the service call. |
37+
38+
- **Returns**
39+
40+
- `{Object} newParams`
3241

3342
| Name | Type | Description |
3443
| ----------- | :------: | -------------------------------- |
@@ -48,7 +57,7 @@ Build `params` for a service call.
4857
propNames: ['customProp'],
4958
newProps: { mongoose: ... },
5059
hooksToDisable: 'populate'
51-
}), context);
60+
}))(context);
5261
// ...
5362
}
5463
```

0 commit comments

Comments
 (0)