vault/ui/app/adapters/clients/monthly.js
claire bontempo 4cacb89c15
UI/Revert client count work pushed to 1.11, add monthly and activity serializers (#13717)
* adds serializer

* removes all 1.11 related work to monthly/new client counting

* move from new-init-activity to activity

* merge setup changes add monthly model/adapter

* delete new-init-activity files

* add graph to current month view
2022-01-25 14:06:56 -08:00

15 lines
527 B
JavaScript

import Application from '../application';
export default Application.extend({
queryRecord() {
let url = `${this.buildURL()}/internal/counters/activity/monthly`;
// Query has startTime defined. The API will return the endTime if none is provided.
return this.ajax(url, 'GET').then((resp) => {
let response = resp || {};
// if the response is a 204 it has no request id (ARG TODO test that it returns a 204)
response.id = response.request_id || 'no-data';
return response;
});
},
});