mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	inject metadata on toplevel
This commit is contained in:
		
							parent
							
								
									d160fe933f
								
							
						
					
					
						commit
						381e7d4763
					
				@ -28,7 +28,7 @@ module.exports = function (app, config) {
 | 
			
		||||
                Object.keys(seenApps).forEach(key => {
 | 
			
		||||
                    seenApps[key] = seenApps[key].map(entry => {
 | 
			
		||||
                        if (metaData[entry.appName]) {
 | 
			
		||||
                            entry.data = metaData[entry.appName];
 | 
			
		||||
                            return Object.assign({}, entry, metaData[entry.appName]);
 | 
			
		||||
                        }
 | 
			
		||||
                        return entry;
 | 
			
		||||
                    });
 | 
			
		||||
@ -118,17 +118,7 @@ module.exports = function (app, config) {
 | 
			
		||||
    app.get('/client/applications/', (req, res) => {
 | 
			
		||||
        clientApplicationsStore
 | 
			
		||||
            .getApplications(req.query)
 | 
			
		||||
            .then(apps => {
 | 
			
		||||
                const applications = apps.map(({ appName, createdAt, strategies }) => ({
 | 
			
		||||
                    appName,
 | 
			
		||||
                    strategies,
 | 
			
		||||
                    createdAt,
 | 
			
		||||
                    links: {
 | 
			
		||||
                        appDetails: `/api/client/applications/${appName}`,
 | 
			
		||||
                    },
 | 
			
		||||
                }));
 | 
			
		||||
                res.json({ applications });
 | 
			
		||||
            })
 | 
			
		||||
            .then(applications => res.json({ applications }))
 | 
			
		||||
            .catch(err => catchLogAndSendErrorResponse(err, res));
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user