diff options
Diffstat (limited to 'cds-ui/server/src/services/blueprint.service.ts')
-rw-r--r-- | cds-ui/server/src/services/blueprint.service.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cds-ui/server/src/services/blueprint.service.ts b/cds-ui/server/src/services/blueprint.service.ts new file mode 100644 index 000000000..f48253652 --- /dev/null +++ b/cds-ui/server/src/services/blueprint.service.ts @@ -0,0 +1,19 @@ +import {getService} from '@loopback/service-proxy'; +import {inject, Provider} from '@loopback/core'; +import {BlueprintDataSource} from '../datasources'; + +export interface BlueprintService { + getAllblueprints(authtoken: string): Promise<any>; +} + +export class BlueprintServiceProvider implements Provider<BlueprintService> { + constructor( + // blueprint must match the name property in the datasource json file + @inject('datasources.blueprint') + protected dataSource: BlueprintDataSource = new BlueprintDataSource(), + ) {} + + value(): Promise<BlueprintService> { + return getService(this.dataSource); + } +}
\ No newline at end of file |