Browse Source
Fix BlogAdminController route token for MoveAllBlogPostsAsync
Route template used {id} but the method parameter is named blogId, so
ASP.NET Core ApiExplorer emitted an orphan path parameter id, which made
ClientProxyBase.BuildHttpProxyClientProxyContext throw
ArgumentOutOfRangeException when deleting a blog from the MVC admin page.
pull/25408/head
maliming
5 months ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
2 changed files with
3 additions and
15 deletions
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/cms-kit-admin-generate-proxy.json
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs
@ -406,7 +406,7 @@
"uniqueName" : "MoveAllBlogPostsAsyncByBlogIdAndAssignToBlogId" ,
"name" : "MoveAllBlogPostsAsync" ,
"httpMethod" : "PUT" ,
"url" : "api/cms-kit-admin/blogs/{i d}/move-all-blog-posts" ,
"url" : "api/cms-kit-admin/blogs/{blogI d}/move-all-blog-posts" ,
"supportedVersions" : [ ] ,
"parametersOnMethod" : [
{
@ -436,7 +436,7 @@
"isOptional" : false ,
"defaultValue" : null ,
"constraintTypes" : null ,
"bindingSourceId" : "ModelBinding " ,
"bindingSourceId" : "Path " ,
"descriptorName" : ""
} ,
{
@ -450,18 +450,6 @@
"constraintTypes" : null ,
"bindingSourceId" : "Query" ,
"descriptorName" : ""
} ,
{
"nameOnMethod" : "id" ,
"name" : "id" ,
"jsonName" : null ,
"type" : null ,
"typeSimple" : null ,
"isOptional" : false ,
"defaultValue" : null ,
"constraintTypes" : [ ] ,
"bindingSourceId" : "Path" ,
"descriptorName" : ""
}
] ,
"returnValue" : {
@ -71,7 +71,7 @@ public class BlogAdminController : CmsKitAdminController, IBlogAdminAppService
}
[HttpPut]
[Route("{i d}/move-all-blog-posts")]
[Route("{blogI d}/move-all-blog-posts")]
[Authorize(CmsKitAdminPermissions.Blogs.Delete)]
public Task MoveAllBlogPostsAsync ( Guid blogId , [ FromQuery ] Guid ? assignToBlogId )
{