Skip to content

Commit

Permalink
"minutes" param fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dephea committed Mar 28, 2024
1 parent defd997 commit d12cbb4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/utils/StatusAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,29 +97,31 @@ class StatusAPI{
}

async getOutgoingStatuses(minutes=null){
CommonUtils.validateInteger('minutes', minutes)

const method = 'getOutgoingStatuses'
const url = ""
let url = ""

if(minutes!==null){
CommonUtils.validateInteger('minutes', minutes)
url = (CommonUtils.generateMethodURL(this._restAPI.params, method) + '?minutes=' + minutes)
}else{
url = (CommonUtils.generateMethodURL(this._restAPI.params, method))
}

const response = await axios.get(url);
return response.data;
}

async getIncomingStatuses(minutes=null){
CommonUtils.validateInteger('minutes', minutes)

const method = 'getIncomingStatuses'
const url = ""
let url = ""

if(minutes!==null){
CommonUtils.validateInteger('minutes', minutes)
url = (CommonUtils.generateMethodURL(this._restAPI.params, method) + '?minutes=' + minutes)
}else{
url = (CommonUtils.generateMethodURL(this._restAPI.params, method))
}

const response = await axios.get(url);
return response.data;
}
Expand Down

0 comments on commit d12cbb4

Please sign in to comment.