Skip to content

Commit

Permalink
update js api
Browse files Browse the repository at this point in the history
  • Loading branch information
toplan committed Jun 17, 2017
1 parent ef45fe2 commit 1c927ff
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions js/laravel-sms.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,8 @@
}

function getUrl() {
var domain = opts.domain || '';
var prefix = opts.prefix || 'laravel-sms';
if (opts.voice) {
return domain + '/' + prefix + '/voice-verify';
}

return domain + '/' + prefix + '/verify-code';
return opts.requestUrl ||
'/laravel-sms/' + (opts.voice ? 'voice-verify' : 'verify-code')
}

function getRequestData() {
Expand Down Expand Up @@ -89,8 +84,7 @@
token : null,
interval : 60,
voice : false,
domain : null,
prefix : 'laravel-sms',
requestUrl : null,
requestData : null,
notify : function (msg, type) {
alert(msg);
Expand Down

0 comments on commit 1c927ff

Please sign in to comment.