Skip to content

Commit

Permalink
Rename OnDocumentChanged to OnDocumentsChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonychu committed Aug 13, 2018
1 parent f0b4a31 commit 782b4a4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Expand Up @@ -11,7 +11,7 @@ namespace SignalRFlights
{
public static class OnDocumentChanged
{
[FunctionName("OnDocumentChanged")]
[FunctionName("OnDocumentsChanged")]
public static async Task Run(
[CosmosDBTrigger("demo", "flights")]IEnumerable<object> updatedFlights,
[SignalR(HubName = "flights")]IAsyncCollector<SignalRMessage> signalRMessages,
Expand Down
8 changes: 0 additions & 8 deletions javascript/OnDocumentChanged/index.js

This file was deleted.

Expand Up @@ -3,7 +3,7 @@
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "documents",
"name": "updatedFlights",
"direction": "in",
"databaseName": "demo",
"collectionName": "flights",
Expand Down
8 changes: 8 additions & 0 deletions javascript/OnDocumentsChanged/index.js
@@ -0,0 +1,8 @@
module.exports = function (context, updatedFlights) {
context.bindings.signalRMessages =
updatedFlights.map(flight => ({
target: 'flightUpdated',
arguments: [flight]
}));
context.done();
};

0 comments on commit 782b4a4

Please sign in to comment.