Skip to content

Commit 262aa59

Browse files
committed
Fixes
1 parent 046b6c7 commit 262aa59

File tree

1 file changed

+26
-28
lines changed

1 file changed

+26
-28
lines changed

articles/event-grid/auth0-log-stream-blob-storage.md

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -24,44 +24,42 @@ This article shows you how to send Auth0 events to Azure Blob Storage via Azure
2424
**function.json**
2525

2626
```json
27-
{
28-
"bindings": [{
29-
"type": "eventGridTrigger",
30-
"name": "eventGridEvent",
31-
"direction": "in"
32-
33-
},
34-
{
35-
"type": "blob",
36-
"name": "outputBlob",
37-
"path": "events/{rand-guid}.json",
38-
"connection": "OUTPUT_STORAGE_ACCOUNT",
39-
"direction": "out"
40-
41-
}
42-
]
43-
}
27+
{
28+
"bindings": [
29+
{
30+
"type": "eventGridTrigger",
31+
"name": "eventGridEvent",
32+
"direction": "in"
33+
},
34+
{
35+
"type": "blob",
36+
"name": "outputBlob",
37+
"path": "events/{rand-guid}.json",
38+
"connection": "OUTPUT_STORAGE_ACCOUNT",
39+
"direction": "out"
40+
}
41+
]
42+
}
4443
```
4544

4645
**index.js**
4746

4847
```javascript
49-
// Event Grid always sends an array of data and may send more
50-
// than one event in the array. The runtime invokes this function
51-
// once for each array element, so we are always dealing with one.
52-
// See: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-event-grid-trigger?tabs=
53-
module.exports = async function (context, eventGridEvent) {
54-
context.log(JSON.stringify(context.bindings));
55-
context.log(JSON.stringify(context.bindingData));
56-
57-
context.bindings.outputBlob = JSON.stringify(eventGridEvent);
58-
};
48+
// Event Grid always sends an array of data and may send more
49+
// than one event in the array. The runtime invokes this function
50+
// once for each array element, so we are always dealing with one.
51+
// See: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-event-grid-trigger?tabs=
52+
module.exports = async function (context, eventGridEvent) {
53+
context.log(JSON.stringify(context.bindings));
54+
context.log(JSON.stringify(context.bindingData));
55+
56+
context.bindings.outputBlob = JSON.stringify(eventGridEvent);
57+
};
5958
```
6059

6160
1. Create an Azure function app using instructions from [Quick function app create](../azure-functions/functions-develop-vs-code.md?tabs=csharp#quick-function-app-create).
6261
1. Deploy your function to the function app on Azure using instructions from [Deploy project files](../azure-functions/functions-develop-vs-code.md?tabs=csharp#republish-project-files).
6362

64-
6563
## Configure Azure function to use your blob storage
6664
1. Configure your Azure function to use your storage account.
6765
1. Select **Configuration** under **Settings** on the left menu.

0 commit comments

Comments
 (0)