24 lines
489 B
JavaScript
24 lines
489 B
JavaScript
export default function() {
|
|
this.namespace = 'v1';
|
|
|
|
this.get('sys/internal/counters/activity', function(db) {
|
|
let data = {};
|
|
const firstRecord = db['metrics/activities'].first();
|
|
if (firstRecord) {
|
|
data = firstRecord;
|
|
}
|
|
return {
|
|
data,
|
|
request_id: '0001',
|
|
};
|
|
});
|
|
|
|
this.get('sys/internal/counters/config', function(db) {
|
|
return {
|
|
request_id: '00001',
|
|
data: db['metrics/configs'].first(),
|
|
};
|
|
});
|
|
this.passthrough();
|
|
}
|