From 6efa6f037385c461221116493e303f96efdeff06 Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Fri, 8 Feb 2019 21:52:07 +0100 Subject: [PATCH] Optional suffix. --- .../Assets/AssetContentController.cs | 5 +++-- src/Squidex/Program.cs | 2 +- .../pages/dashboard-page.component.html | 2 +- .../pages/clients/client.component.html | 2 +- .../pages/clients/client.component.scss | 10 +++++---- .../pages/internal/apps-menu.component.html | 22 ++++++++++--------- 6 files changed, 24 insertions(+), 19 deletions(-) diff --git a/src/Squidex/Areas/Api/Controllers/Assets/AssetContentController.cs b/src/Squidex/Areas/Api/Controllers/Assets/AssetContentController.cs index 6f243f8bf..91d094ea5 100644 --- a/src/Squidex/Areas/Api/Controllers/Assets/AssetContentController.cs +++ b/src/Squidex/Areas/Api/Controllers/Assets/AssetContentController.cs @@ -47,6 +47,7 @@ namespace Squidex.Areas.Api.Controllers.Assets /// Get the asset content. /// /// The id of the asset. + /// Optional suffix that can be used to seo-optimize the link to the image Has not effect. /// The optional version of the asset. /// The target width of the asset, if it is an image. /// The target height of the asset, if it is an image. @@ -56,10 +57,10 @@ namespace Squidex.Areas.Api.Controllers.Assets /// 404 => Asset or app not found. /// [HttpGet] - [Route("assets/{id}/")] + [Route("assets/{id}/{*more}")] [ProducesResponseType(typeof(FileResult), 200)] [ApiCosts(0.5)] - public async Task GetAssetContent(Guid id, [FromQuery] long version = EtagVersion.Any, [FromQuery] int? width = null, [FromQuery] int? height = null, [FromQuery] string mode = null) + public async Task GetAssetContent(Guid id, string more, [FromQuery] long version = EtagVersion.Any, [FromQuery] int? width = null, [FromQuery] int? height = null, [FromQuery] string mode = null) { var entity = await assetRepository.FindAssetAsync(id); diff --git a/src/Squidex/Program.cs b/src/Squidex/Program.cs index 822978e0a..e427eff3d 100644 --- a/src/Squidex/Program.cs +++ b/src/Squidex/Program.cs @@ -37,7 +37,7 @@ namespace Squidex { builder.Sources.Clear(); - builder.AddJsonFile("appsettings.json", true, true); + builder.AddJsonFile($"appsettings.json", true, true); builder.AddJsonFile($"appsettings.{hostContext.HostingEnvironment.EnvironmentName}.json", true); builder.AddEnvironmentVariables(); diff --git a/src/Squidex/app/features/dashboard/pages/dashboard-page.component.html b/src/Squidex/app/features/dashboard/pages/dashboard-page.component.html index 32dede6dd..f9b597d00 100644 --- a/src/Squidex/app/features/dashboard/pages/dashboard-page.component.html +++ b/src/Squidex/app/features/dashboard/pages/dashboard-page.component.html @@ -12,7 +12,7 @@