mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-23 17:39:59 +00:00
16 lines
544 B
TypeScript
16 lines
544 B
TypeScript
import { IFunctionRouteHandler } from '@datahub/utils/types/vendor/ember-cli-mirage-deprecated';
|
|
import { IMirageWherehowsDBs } from 'wherehows-web/typings/ember-cli-mirage';
|
|
import { IDataPlatform } from '@datahub/metadata-types/types/entity/dataset/platform';
|
|
|
|
interface IReturnType {
|
|
platforms: Array<IDataPlatform>;
|
|
}
|
|
export const getDatasetPlatforms = function(
|
|
this: IFunctionRouteHandler,
|
|
{ platforms }: IMirageWherehowsDBs
|
|
): IReturnType {
|
|
return {
|
|
platforms: this.serialize(platforms.all()) as Array<IDataPlatform>
|
|
};
|
|
};
|