2019-08-31 20:51:14 -07:00
|
|
|
import { IFunctionRouteHandler } from '@datahub/utils/types/vendor/ember-cli-mirage-deprecated';
|
2020-11-09 12:17:51 -08:00
|
|
|
import { IMirageDatasetCoreSchema } from '@datahub/entities/types/vendor/mirage-for-datasets';
|
2019-08-31 20:51:14 -07:00
|
|
|
import { IDataPlatform } from '@datahub/metadata-types/types/entity/dataset/platform';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This handler is used by the mirage route config to handle the get request for dataset compliance data types
|
|
|
|
*/
|
|
|
|
export const getDataPlatforms = function(
|
|
|
|
this: IFunctionRouteHandler,
|
|
|
|
schema: IMirageDatasetCoreSchema
|
|
|
|
): { platforms: Array<IDataPlatform> } {
|
|
|
|
return { platforms: this.serialize(schema.db.platforms) };
|
|
|
|
};
|