Skip to content
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

KAZOO-5800: Re-check for call restrictions after shortdial correction #4675

Merged
merged 1 commit into from Jun 13, 2018

Conversation

harenson
Copy link
Contributor

No description provided.

@jamesaimonetti
Copy link
Member

Can you rebase and recheck this functionality? Let's get it merged once rebased

@harenson
Copy link
Contributor Author

harenson commented May 17, 2018

Done :)

{'error', _R} ->
Call;
{'ok', JObj} ->
CallRestriction = kz_json:get_value(<<"call_restriction">>, JObj),
Copy link
Member

Choose a reason for hiding this comment

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

Use the more specific getters when you can: get_json_value/2 (maybe with a default kz_json:new()?) and get_ne_binary_value/2 on the next line.

@@ -77,6 +77,9 @@
"Custom-SIP-Headers": {
"type": "object"
},
"Denied-Call-Restrictions": {
Copy link
Member

Choose a reason for hiding this comment

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

Are they really a string? Or should this be an object? You can hint at it in the kapi module using a validator or you can manually correct this schema.

@jamesaimonetti
Copy link
Member

@harenson i refactored a bit; mind checking if things are still working on your tests? Will merge if you agree :)

…#4675)

refactor a bit

refactor to named function

fix function arity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants