Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add context-types as array of string #712

Merged
merged 3 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/pr-712-2027113298.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

---
"fusion-project-portal": patch
---
ContextTypes are returned as array of string
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -23,6 +24,7 @@ public ApiOnboardedApp(OnboardedAppDto onboardedAppDto)
public string? Name { get; set; }
public string? Description { get; set; }
public IList<ApiContextType> Contexts { get; set; }
public IList<string> ContextTypes { get; set; }
public ApiFusionPortalAppInformation? AppInformation { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -29,6 +30,7 @@ public ApiPortal(PortalDto portalDto)
public string? Description { get; set; }
public string Icon { get; set; } = null!;
public IList<ApiContextType> Contexts { get; set; }
public IList<string> ContextTypes { get; set; }
public List<ApiPortalApp> Apps { get; set; } = null!;
}
}
Loading