diff --git a/backend/src/Equinor.ProjectExecutionPortal.WebApi/Controllers/BundleController.cs b/backend/src/Equinor.ProjectExecutionPortal.WebApi/Controllers/BundleController.cs deleted file mode 100644 index ef03e1a2..00000000 --- a/backend/src/Equinor.ProjectExecutionPortal.WebApi/Controllers/BundleController.cs +++ /dev/null @@ -1,32 +0,0 @@ -//using Equinor.ProjectExecutionPortal.FusionPortalApi.Apps; -//using Microsoft.AspNetCore.Authorization; -//using Microsoft.AspNetCore.Mvc; - -//namespace Equinor.ProjectExecutionPortal.WebApi.Controllers -//{ -// //[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] -// [ApiVersion("0.1")] -// [Route("api/bundles")] -// [ResponseCache(NoStore = true, Location = ResponseCacheLocation.None)] -// public class BundleController : ApiControllerBase -// { -// [AllowAnonymous] -// [HttpGet("{appKey}")] -// [HttpGet("{appKey}.js")] -// [ProducesResponseType(StatusCodes.Status200OK)] -// [ProducesResponseType(typeof(void), StatusCodes.Status404NotFound)] -// public async Task FusionPortalAppBundle([FromServices] IFusionPortalApiService fusionPortalApiService, [FromRoute] string appKey) -// { -// try -// { -// var appBundle = await fusionPortalApiService.TryGetFusionPortalAppBundle(appKey); - -// return File(appBundle, "application/javascript"); -// } -// catch (Exception ex) -// { -// return FusionApiError.NotFound(appKey, ex.Message); -// } -// } -// } -//} diff --git a/backend/src/Equinor.ProjectExecutionPortal.WebApi/Controllers/FusionController.cs b/backend/src/Equinor.ProjectExecutionPortal.WebApi/Controllers/FusionController.cs index 5824845e..76df922b 100644 --- a/backend/src/Equinor.ProjectExecutionPortal.WebApi/Controllers/FusionController.cs +++ b/backend/src/Equinor.ProjectExecutionPortal.WebApi/Controllers/FusionController.cs @@ -7,6 +7,7 @@ namespace Equinor.ProjectExecutionPortal.WebApi.Controllers { + // TODO: This controller should be removed and replaced with the ClientBackend proxy [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] [ApiVersion("0.1")] [Route("api/fusion")] diff --git a/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/FusionApp/ApiFusionApp.cs b/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/FusionApp/ApiFusionApp.cs index 67a82f86..0309e5a5 100644 --- a/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/FusionApp/ApiFusionApp.cs +++ b/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/FusionApp/ApiFusionApp.cs @@ -19,10 +19,10 @@ public ApiFusionApp(App fusionApp) Build = fusionApp.Build != null ? new ApiFusionAppVersion(fusionApp.Build) : null; } - public string AppKey { get; set; } = null!; - public string DisplayName { get; set; } = null!; - public string? Description { get; set; } = null!; - public string? Type { get; set; } = null!; + public string AppKey { get; set; } + public string DisplayName { get; set; } + public string? Description { get; set; } + public string? Type { get; set; } public string? Version { get; set; } public bool? IsPinned { get; set; } public string? TemplateSource { get; set; } diff --git a/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/FusionApp/ApiFusionAppCategory.cs b/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/FusionApp/ApiFusionAppCategory.cs index 116112be..25144452 100644 --- a/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/FusionApp/ApiFusionAppCategory.cs +++ b/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/FusionApp/ApiFusionAppCategory.cs @@ -18,10 +18,10 @@ public ApiFusionAppCategory(AppCategory fusionAppCategory) } public Guid Id { get; set; } - public string Name { get; set; } = null!; - public string DisplayName { get; set; } = null!; - public string Color { get; set; } = null!; - public string DefaultIcon { get; set; } = null!; + public string Name { get; set; } + public string DisplayName { get; set; } + public string Color { get; set; } + public string DefaultIcon { get; set; } public short SortOrder { get; set; } } } diff --git a/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/FusionApp/ApiFusionAppVersion.cs b/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/FusionApp/ApiFusionAppVersion.cs index a609e39a..3ab3837c 100644 --- a/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/FusionApp/ApiFusionAppVersion.cs +++ b/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/FusionApp/ApiFusionAppVersion.cs @@ -17,8 +17,8 @@ public ApiFusionAppVersion(AppVersion fusionAppVersion) ConfigUrl = fusionAppVersion.ConfigUrl; } - public string Version { get; set; } = null!; - public string EntryPoint { get; set; } = null!; + public string Version { get; set; } + public string EntryPoint { get; set; } public List? Tags { get; set; } public string? Tag { get; set; } public string? AssetPath { get; set; } diff --git a/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/OnboardedApp/ApiOnboardedApp.cs b/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/OnboardedApp/ApiOnboardedApp.cs index 5b5a9f08..f26e0cba 100644 --- a/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/OnboardedApp/ApiOnboardedApp.cs +++ b/backend/src/Equinor.ProjectExecutionPortal.WebApi/ViewModels/OnboardedApp/ApiOnboardedApp.cs @@ -20,7 +20,7 @@ public ApiOnboardedApp(OnboardedAppDto onboardedAppDto) } public Guid Id { get; set; } - public string AppKey { get; set; } = null!; + public string AppKey { get; set; } public string? Name { get; set; } public string? Description { get; set; } public IList Contexts { get; set; } = new List(); diff --git a/backend/src/tests/Equinor.ProjectExecutionPortal.Tests.WebApi/IntegrationTests/PortalControllerTests.cs b/backend/src/tests/Equinor.ProjectExecutionPortal.Tests.WebApi/IntegrationTests/PortalControllerTests.cs index 87f0f8c0..5ed60704 100644 --- a/backend/src/tests/Equinor.ProjectExecutionPortal.Tests.WebApi/IntegrationTests/PortalControllerTests.cs +++ b/backend/src/tests/Equinor.ProjectExecutionPortal.Tests.WebApi/IntegrationTests/PortalControllerTests.cs @@ -1,6 +1,5 @@ using System.Net; using System.Text; -using Azure; using Equinor.ProjectExecutionPortal.Tests.WebApi.Data; using Equinor.ProjectExecutionPortal.Tests.WebApi.Setup; using Equinor.ProjectExecutionPortal.WebApi.ViewModels.Portal;