mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-10-31 02:37:05 +00:00 
			
		
		
		
	
		
			
	
	
		
			10 lines
		
	
	
		
			334 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
		
		
			
		
	
	
			10 lines
		
	
	
		
			334 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
|   | import { IFunctionRouteHandler } from 'wherehows-web/typings/ember-cli-mirage'; | ||
|  | 
 | ||
|  | export const getDatasetHealth = function(this: IFunctionRouteHandler, { health }: any, request: any) { | ||
|  |   const { dataset_id } = request.params; | ||
|  | 
 | ||
|  |   return { | ||
|  |     health: health.filter((score: any) => score.refDatasetUrn === dataset_id)[0] || null | ||
|  |   }; | ||
|  | }; |