diff options
Diffstat (limited to 'cds-ui/server/src/services')
-rw-r--r-- | cds-ui/server/src/services/blueprint.service.ts | 19 | ||||
-rw-r--r-- | cds-ui/server/src/services/index.ts | 1 |
2 files changed, 20 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 diff --git a/cds-ui/server/src/services/index.ts b/cds-ui/server/src/services/index.ts new file mode 100644 index 000000000..26b01ed0b --- /dev/null +++ b/cds-ui/server/src/services/index.ts @@ -0,0 +1 @@ +export * from './blueprint.service'; |