Closed tarekziade closed 2 months ago
We don't choose the callback formalism. It is defined by the SMS provider.
We don't choose the callback formalism. It is defined by the SMS provider.
I don't understand why that prevents us from wrapping the code for a given provider in a single class
Hum I think I see what you mean. I will try that yes.
cool! It's just an improvement idea, not urgent
Looking at the current endpoints, it looks like we are adding a specific endpoint for each sms backend we're adding. e.g.:
in index.js. With the same code beside grabbing the right options from the request depending on the backend.
If possible we should try to have the SMS backend specific code located into the class in sms/.js and have the callback code implemented there.
One other improvement in mind to have a single url, with the backend name as a param : /sms/momt/callback?name=nexmo&msisdn=xxx&text=xxx&...