vault/ui/app/adapters/metrics/activity.js
Chelsea Shaw 2c7cadb731
Ui/pricing metrics params (#10083)
metrics route takes start and end params and passes to the date display field, as well as the route's API call
2020-10-05 16:34:52 -05:00

16 lines
408 B
JavaScript

import Application from '../application';
export default Application.extend({
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 => {
resp.id = resp.request_id;
return resp;
});
},
});