add endpoint to check US providers

This commit is contained in:
Ian Webster 2014-04-16 14:00:09 -07:00
parent c65892f459
commit 73025e6d57

4
app.js
View File

@ -29,6 +29,10 @@ app.get('/', function(req, res) {
}); });
}); });
app.get('/providers/us', function(req, res) {
res.send(providers.us);
});
app.post('/text', function(req, res) { app.post('/text', function(req, res) {
var number = stripPhone(req.body.number); var number = stripPhone(req.body.number);
if (number.length < 9 || number.length > 10) { if (number.length < 9 || number.length > 10) {