We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f6b085 commit ffcab8bCopy full SHA for ffcab8b
lib/Thepeer.js
@@ -166,11 +166,7 @@ class Thepeer {
166
*/
167
async getBusinesses (channel) {
168
try {
169
- let url = '/businesses'
170
- if (channel.length !== 0) {
171
- url += `?channel=${channel}`
172
- }
173
- const response = await this.request.get(url)
+ const response = await this.request.get(`/businesses?channel=${channel}`)
174
return response.data
175
} catch (e) {
176
Helper.processError(e)
0 commit comments