Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Commit

Permalink
Fix weather connector example
Browse files Browse the repository at this point in the history
While testing an external connector, I found a couple of typos and missing
information.

This commit:

* Fixes reports action url
* Fixes escape codes in the regex
* Adds authentication_header so the example will work
  • Loading branch information
John Bard committed Oct 23, 2017
1 parent d24e0c1 commit 43345f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion samples/node/public/discovery/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"authentication_header": "X-Weather-Authorization",
"fields": {
"zip": {
"regex": "(^\d{5}(?:[-\s]\d{4})?$)"
"regex": "([0-9]{5})(?:[- ][0-9]{4})?"
}
}
}
2 changes: 1 addition & 1 deletion samples/node/routes/weather.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function toCard(zip, routingPrefix) {
label: "Report weather",
completed_label: "Weather reported successfully",
url: {
href: `${routingPrefix}weather/reports`
href: `${routingPrefix}reports`
},
type: "POST",
request: {
Expand Down

0 comments on commit 43345f5

Please sign in to comment.