Skip to content

Function names to match with routes #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 22, 2018

Conversation

arshadkazmi42
Copy link
Contributor

Fixes #Nexmo/nexmo-developer

Update function names to match the routes

@mheap
Copy link
Contributor

mheap commented Oct 21, 2018

@tbedford Can you review + pull the updates in to NDP?

sms/dlr-flask.py Outdated
@@ -4,7 +4,7 @@
app = Flask(__name__)

@app.route('/webhooks/delivery-receipt', methods=['GET', 'POST'])
def delivery_receipt():
def inbound_sms():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not correct. This is the delivery receipt webhook, why are you changing it to inbound sms?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checked. I did the change other way around. Making this fix now.

@@ -26,7 +26,7 @@ def answer_call():


@app.route("/webhooks/dtmf", methods=['POST'])
def inout_webhook():
def input_webhook():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't need fixing, but if we are going to change it to something we should probably change the function name to dtmf

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this change based on the other language sample code NodeJs, 'Java'.
I felt inout_webhook was a type.

Does this change even require?

@tbedford
Copy link
Contributor

If you look at the original issue:

https://github.com/Nexmo/nexmo-developer/issues/1000

You can see that for the inbound sms webhook the associated function was delivery_receipt(). Delivery receipt function name needed to be changed to inbound_sms() so that it matched its associated webhook route.

@tbedford tbedford merged commit e472e3c into Vonage:master Oct 22, 2018
@tbedford
Copy link
Contributor

Thanks!

@arshadkazmi42 arshadkazmi42 deleted the function-names-update branch October 22, 2018 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants