addresses case inconsistency in pubsubname var (#308)

This commit is contained in:
Mark Chmarny 2020-09-29 12:34:37 -07:00 committed by GitHub
parent a10181528c
commit 45972d3668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -205,12 +205,12 @@ Navigate to the `node-subscriber` directory and open `app.js`, the code for the
app.get('/dapr/subscribe', (_req, res) => {
res.json([
{
pubsubName: "pubsub",
pubsubname: "pubsub",
topic: "A",
route: "A"
},
{
pubsubName: "pubsub",
pubsubname: "pubsub",
topic: "B",
route: "B"
}
@ -240,7 +240,7 @@ Navigate to the `python-subscriber` directory and open `app.py`, the code for th
```python
@app.route('/dapr/subscribe', methods=['GET'])
def subscribe():
subscriptions = [{'pubsubName': 'pubsub', 'topic': 'A', 'route': 'A'}, {'pubsubName': 'pubsub', 'topic': 'C', 'route': 'C'}]
subscriptions = [{'pubsubname': 'pubsub', 'topic': 'A', 'route': 'A'}, {'pubsubname': 'pubsub', 'topic': 'C', 'route': 'C'}]
return jsonify(subscriptions)
```
Again, this is how you tell Dapr what topics in which pubsub component to subscribe to. In this case, subscribing to topics "A" and "C" of pubsub component named 'pubsub'. Messages of those topics are handled with the other two routes:

View File

@ -15,12 +15,12 @@ const port = 3000;
app.get('/dapr/subscribe', (_req, res) => {
res.json([
{
pubsubName: "pubsub",
pubsubname: "pubsub",
topic: "A",
route: "A"
},
{
pubsubName: "pubsub",
pubsubname: "pubsub",
topic: "B",
route: "B"
}

View File

@ -14,7 +14,7 @@ CORS(app)
@app.route('/dapr/subscribe', methods=['GET'])
def subscribe():
subscriptions = [{'pubsubName': 'pubsub', 'topic': 'A', 'route': 'A'}, {'pubsubName': 'pubsub', 'topic': 'C', 'route': 'C'}]
subscriptions = [{'pubsubname': 'pubsub', 'topic': 'A', 'route': 'A'}, {'pubsubname': 'pubsub', 'topic': 'C', 'route': 'C'}]
return jsonify(subscriptions)
@app.route('/A', methods=['POST'])