chore: Add inbox id in get campaigns API (#2278)
This commit is contained in:
@@ -9,6 +9,10 @@ class Inboxes extends ApiClient {
|
||||
getAssignableAgents(inboxId) {
|
||||
return axios.get(`${this.url}/${inboxId}/assignable_agents`);
|
||||
}
|
||||
|
||||
getCampaigns(inboxId) {
|
||||
return axios.get(`${this.url}/${inboxId}/campaigns`);
|
||||
}
|
||||
}
|
||||
|
||||
export default new Inboxes();
|
||||
|
||||
13
app/javascript/dashboard/api/specs/campaign.spec.js
Normal file
13
app/javascript/dashboard/api/specs/campaign.spec.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import campaigns from '../campaigns';
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
describe('#CampaignAPI', () => {
|
||||
it('creates correct instance', () => {
|
||||
expect(campaigns).toBeInstanceOf(ApiClient);
|
||||
expect(campaigns).toHaveProperty('get');
|
||||
expect(campaigns).toHaveProperty('show');
|
||||
expect(campaigns).toHaveProperty('create');
|
||||
expect(campaigns).toHaveProperty('update');
|
||||
expect(campaigns).toHaveProperty('delete');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user