Skip to content

Commit

Permalink
fix mobizone
Browse files Browse the repository at this point in the history
  • Loading branch information
yariksav committed Jun 4, 2020
1 parent 31525e6 commit 62326c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "adonis-smser",
"version": "0.0.4",
"version": "0.1.0",
"description": "Sms provider for adonis framework and has support for several common sms services to send sms",
"main": "index.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion src/Smser/Drivers/Mobizon.js
Expand Up @@ -46,7 +46,7 @@ class MobizonDriver extends BaseDriver {

let res = await got.get(url)
let data = JSON.parse(res.body)
if (data.code !== 0 || data.code !== 100) {
if (![0, '0', 100, '100'].includes(data.code) && data.message) {
throw new Error(data.message)
}
return {
Expand Down

0 comments on commit 62326c2

Please sign in to comment.