mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	Remove /api/client/seen-toggles as we don't need it anyway
This commit is contained in:
		
							parent
							
								
									51442a6cc4
								
							
						
					
					
						commit
						52fcfb4a2b
					
				@ -20,23 +20,6 @@ module.exports = function (app, config) {
 | 
				
			|||||||
        res.json(seenAppToggles);
 | 
					        res.json(seenAppToggles);
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    app.get('/client/seen-apps', (req, res) => {
 | 
					 | 
				
			||||||
        const seenApps = metrics.getSeenAppsPerToggle();
 | 
					 | 
				
			||||||
        clientApplicationsStore.getApplications()
 | 
					 | 
				
			||||||
            .then(toLookup)
 | 
					 | 
				
			||||||
            .then(metaData => {
 | 
					 | 
				
			||||||
                Object.keys(seenApps).forEach(key => {
 | 
					 | 
				
			||||||
                    seenApps[key] = seenApps[key].map(entry => {
 | 
					 | 
				
			||||||
                        if (metaData[entry.appName]) {
 | 
					 | 
				
			||||||
                            entry.data = metaData[entry.appName];
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                        return entry;
 | 
					 | 
				
			||||||
                    });
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
                res.json(seenApps);
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
    });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    app.get('/client/metrics/feature-toggles', (req, res) => {
 | 
					    app.get('/client/metrics/feature-toggles', (req, res) => {
 | 
				
			||||||
        res.json(metrics.getTogglesMetrics());
 | 
					        res.json(metrics.getTogglesMetrics());
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
@ -108,13 +91,6 @@ module.exports = function (app, config) {
 | 
				
			|||||||
            });
 | 
					            });
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    function toLookup (metaData) {
 | 
					 | 
				
			||||||
        return metaData.reduce((result, entry) => {
 | 
					 | 
				
			||||||
            result[entry.appName] = entry;
 | 
					 | 
				
			||||||
            return result;
 | 
					 | 
				
			||||||
        }, {});
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    app.get('/client/applications/', (req, res) => {
 | 
					    app.get('/client/applications/', (req, res) => {
 | 
				
			||||||
        clientApplicationsStore
 | 
					        clientApplicationsStore
 | 
				
			||||||
            .getApplications(req.query)
 | 
					            .getApplications(req.query)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user