From 5274700b1d0a0129045de300af97e02de4461371 Mon Sep 17 00:00:00 2001 From: Steve Reis <stevereis93@gmail.com> Date: Wed, 22 Dec 2021 17:39:56 +0000 Subject: [PATCH] Fix galaxy feature --- api/src/engine/connectors/exareme/main.connector.ts | 8 ++++++++ api/src/engine/engine.controller.ts | 5 +++++ api/src/engine/engine.interfaces.ts | 2 ++ 3 files changed, 15 insertions(+) diff --git a/api/src/engine/connectors/exareme/main.connector.ts b/api/src/engine/connectors/exareme/main.connector.ts index f096ddd..146fb43 100644 --- a/api/src/engine/connectors/exareme/main.connector.ts +++ b/api/src/engine/connectors/exareme/main.connector.ts @@ -226,6 +226,14 @@ export default class ExaremeService implements IEngineService { .pipe(map((response) => response.data)); } + getPassthrough(suffix: string): string | Observable<string> { + const path = this.options.baseurl + suffix; + + return this.httpService + .get<string>(path, { params: this.req.query }) + .pipe(map((response) => response.data)); + } + // UTILITIES private flattenGroups = (data: Hierarchy): Group[] => { let groups: Group[] = [dataToGroup(data)]; diff --git a/api/src/engine/engine.controller.ts b/api/src/engine/engine.controller.ts index d7f34d4..e56fa8e 100644 --- a/api/src/engine/engine.controller.ts +++ b/api/src/engine/engine.controller.ts @@ -69,4 +69,9 @@ export class EngineController { logout(): void { this.engineService.logout(); } + + @Get('galaxy') + galaxy(): Observable<string> | string { + return this.engineService.getPassthrough?.('galaxy'); + } } diff --git a/api/src/engine/engine.interfaces.ts b/api/src/engine/engine.interfaces.ts index 29e57f1..ec4fbc7 100644 --- a/api/src/engine/engine.interfaces.ts +++ b/api/src/engine/engine.interfaces.ts @@ -61,4 +61,6 @@ export interface IEngineService { editActiveUser(): Observable<string> | string; logout(): void; + + getPassthrough?(suffix: string): Observable<string> | string; } -- GitLab