Skip to content

Commit

Permalink
fix whitelabels routes
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnata committed Apr 15, 2021
1 parent 009e074 commit bf9911d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/api/whitelabels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@ export default class ApiWhitelabels {
}

list(page: number = 1, limit: number = 15) {
return this.api.get(`/claptable/whitelabels?page=${page}&limit=${limit}`)
return this.api.get(`/whitelabels?page=${page}&limit=${limit}`)
}
view(id: string) {
return this.api.get(`/claptable/whitelabels/${id}`)
return this.api.get(`/whitelabels/${id}`)
}
by_bundle_id(bundle_id: string) {
return this.api.get(`/claptable/whitelabels/by_bundle_id/${bundle_id}`)
return this.api.get(`/whitelabels/by_bundle_id/${bundle_id}`)
}
/**
* Filter results by any property, through a query.
* Ex: { foo: 'bar' }
*/
search(query: object, page: number = 1, limit: number = 15, populate: Array<string> = [], select: Array<string> = []) {
return this.api.get(`/claptable/whitelabels/search?query=${encodeURIComponent(JSON.stringify(query))}&page=${page}&limit=${limit}&populate=${populate.join(',')}&select=${select.join(',')}`)
return this.api.get(`/whitelabels/search?query=${encodeURIComponent(JSON.stringify(query))}&page=${page}&limit=${limit}&populate=${populate.join(',')}&select=${select.join(',')}`)
}
create(data: Whitelabel) {
return this.api.post(`/claptable/whitelabels`, data)
return this.api.post(`/whitelabels`, data)
}
update(id: string, data: Whitelabel) {
return this.api.put(`/claptable/whitelabels/${id}`, data)
return this.api.put(`/whitelabels/${id}`, data)
}
remove(id: string) {
return this.api.delete(`/claptable/whitelabels/${id}`)
return this.api.delete(`/whitelabels/${id}`)
}
}

0 comments on commit bf9911d

Please sign in to comment.