2020-10-01 19:37:33 +00:00
|
|
|
import Application from '../application';
|
|
|
|
|
|
|
|
export default Application.extend({
|
2020-10-05 21:34:52 +00:00
|
|
|
pathForType() {
|
|
|
|
return 'internal/counters/activity';
|
|
|
|
},
|
|
|
|
queryRecord(store, type, query) {
|
|
|
|
const url = this.urlForQuery(null, type);
|
|
|
|
// API accepts start and end as query params
|
|
|
|
return this.ajax(url, 'GET', { data: query }).then(resp => {
|
2020-10-21 16:35:36 +00:00
|
|
|
let response = resp || {};
|
|
|
|
// if the response is a 204 it has no request id
|
|
|
|
response.id = response.request_id || 'no-data';
|
|
|
|
return response;
|
2020-10-01 19:37:33 +00:00
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|