2020-11-09 15:41:19 +00:00
|
|
|
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(),
|
|
|
|
};
|
|
|
|
});
|
2021-01-07 20:18:36 +00:00
|
|
|
|
|
|
|
this.get('/sys/internal/ui/feature-flags', db => {
|
|
|
|
const featuresResponse = db.features.first();
|
|
|
|
return {
|
|
|
|
data: {
|
|
|
|
feature_flags: featuresResponse ? featuresResponse.feature_flags : null,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2020-11-09 15:41:19 +00:00
|
|
|
this.passthrough();
|
|
|
|
}
|