mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: should wait for seen apps
This commit is contained in:
parent
806ecf7385
commit
9607ebce75
@ -27,23 +27,24 @@ class MetricsController extends Controller {
|
||||
this.get('/applications/:appName', this.getApplication);
|
||||
}
|
||||
|
||||
getSeenToggles(req, res) {
|
||||
const seenAppToggles = this.metrics.getAppsWithToggles();
|
||||
async getSeenToggles(req, res) {
|
||||
const seenAppToggles = await this.metrics.getAppsWithToggles();
|
||||
res.json(seenAppToggles);
|
||||
}
|
||||
|
||||
async getSeenApps(req, res) {
|
||||
const seenApps = this.metrics.getSeenApps();
|
||||
const seenApps = await this.metrics.getSeenApps();
|
||||
res.json(seenApps);
|
||||
}
|
||||
|
||||
getFeatureToggles(req, res) {
|
||||
res.json(this.metrics.getTogglesMetrics());
|
||||
async getFeatureToggles(req, res) {
|
||||
const toggles = await this.metrics.getTogglesMetrics();
|
||||
res.json(toggles);
|
||||
}
|
||||
|
||||
getFeatureToggle(req, res) {
|
||||
async getFeatureToggle(req, res) {
|
||||
const { name } = req.params;
|
||||
const data = this.metrics.getTogglesMetrics();
|
||||
const data = await this.metrics.getTogglesMetrics();
|
||||
const lastHour = data.lastHour[name] || {};
|
||||
const lastMinute = data.lastMinute[name] || {};
|
||||
res.json({
|
||||
|
Loading…
Reference in New Issue
Block a user