diff --git a/.changeset/pr-712-2027113298.md b/.changeset/pr-712-2027113298.md new file mode 100644 index 000000000..9b0949e82 --- /dev/null +++ b/.changeset/pr-712-2027113298.md @@ -0,0 +1,5 @@ + +--- +"fusion-project-portal": patch +--- +ContextTypes are returned as array of string diff --git a/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/OnboardedApp/ApiOnboardedApp.cs b/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/OnboardedApp/ApiOnboardedApp.cs index 5abe1f52a..0f0216beb 100644 --- a/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/OnboardedApp/ApiOnboardedApp.cs +++ b/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/OnboardedApp/ApiOnboardedApp.cs @@ -15,6 +15,7 @@ public ApiOnboardedApp(OnboardedAppDto onboardedAppDto) Name = onboardedAppDto.AppInformation?.Name; Description = onboardedAppDto.AppInformation?.Description; Contexts = onboardedAppDto.ContextTypes.Select(x => new ApiContextType(x)).ToList(); + ContextTypes = onboardedAppDto.ContextTypes.Select(x => x.ContextTypeKey).ToList(); AppInformation = onboardedAppDto.AppInformation != null ? new ApiFusionPortalAppInformation(onboardedAppDto.AppInformation) : null; } @@ -23,6 +24,7 @@ public ApiOnboardedApp(OnboardedAppDto onboardedAppDto) public string? Name { get; set; } public string? Description { get; set; } public IList Contexts { get; set; } + public IList ContextTypes { get; set; } public ApiFusionPortalAppInformation? AppInformation { get; set; } } } diff --git a/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/Portal/ApiPortal.cs b/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/Portal/ApiPortal.cs index 9b0486db5..80b9c20a8 100644 --- a/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/Portal/ApiPortal.cs +++ b/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/Portal/ApiPortal.cs @@ -18,6 +18,7 @@ public ApiPortal(PortalDto portalDto) Description = portalDto.Description; Icon = portalDto.Icon; Contexts = portalDto.ContextTypes.Select(x => new ApiContextType(x)).ToList(); + ContextTypes = portalDto.ContextTypes.Select(x => x.ContextTypeKey).ToList(); Apps = portalDto.Apps.Select(x => new ApiPortalApp(x)).ToList(); } @@ -29,6 +30,7 @@ public ApiPortal(PortalDto portalDto) public string? Description { get; set; } public string Icon { get; set; } = null!; public IList Contexts { get; set; } + public IList ContextTypes { get; set; } public List Apps { get; set; } = null!; } }