Skip to content

Commit 8f197a0

Browse files
AndyVadim Demedes
andauthored
Apply suggestions from code review
Co-authored-by: Vadim Demedes <[email protected]>
1 parent 4c569f4 commit 8f197a0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/connections/functions/destination-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ If any of your deployed function instances are failing consistently, they will a
261261

262262
### Data control
263263

264-
You can use [Destination Filters](/docs/connections/destinations/destination-filters/) or Privacy Controls to manage what events and, of those events, which event properties are sent to your Destination Function.
264+
You can use [Destination Filters](/docs/connections/destinations/destination-filters/) or [Privacy Portal](https://segment.com/docs/privacy/portal/) to manage what events and, of those events, which event properties are sent to your destination function.
265265

266266
## Destination functions FAQs
267267

src/connections/functions/usage.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@ If you’re making many requests that could be done in parallel, ensure that you
4444

4545
```js
4646
for (const objectId of event.properties.objects) {
47-
const resp = await fetch('https://example.com/?id=' + objectId, {
47+
const response = await fetch('https://example.com/?id=' + objectId, {
48+
method: 'POST',
4849
body: event.properties
4950
})
50-
console.log(resp.json())
51+
52+
console.log(response.json())
5153
}
52-
53-
return "Done!"
5454
```
5555

5656
Instead, consider making an array of async requests that are running in parallel and then using `Promise.all()` to wait for all of them to complete:
5757

5858
```js
59-
const requests = event.properties.objects.map((objectId) => {
59+
const requests = event.properties.objects.map(objectId => {
6060
return fetch('https://example.com/?id=' + objectId, {
6161
body: event.properties
6262
})

0 commit comments

Comments
 (0)