Skip to content

Commit c9e3b86

Browse files
committed
fix stack overflow in api controller
1 parent 2896d0e commit c9e3b86

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Umbraco.Cms.Integrations.Search.Algolia/Api/Management/Controllers/GetContentTypesController.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ public GetContentTypesController(
4949

5050
[HttpGet("content-type")]
5151
[ProducesResponseType(typeof(List<ContentTypeDto>), StatusCodes.Status200OK)]
52-
public IActionResult GetContentTypes() => Ok(GetContentTypes());
53-
52+
public IActionResult Get() => Ok(GetContentTypes());
53+
5454
[HttpGet("content-type/index/{id:int}")]
5555
[ProducesResponseType(typeof(List<ContentTypeDto>), StatusCodes.Status200OK)]
56-
public IActionResult GetContentTypesByIndexId(int id) => Ok(GetContentTypes(id));
56+
public IActionResult GetByIndexId(int id) => Ok(GetContentTypes(id));
5757

58-
private List<ContentTypeDto> GetContentTypes(int? id)
58+
private List<ContentTypeDto> GetContentTypes(int? id = null)
5959
{
6060
IndexConfiguration indexConfiguration = new IndexConfiguration();
6161
var list = new List<ContentTypeDto>();

0 commit comments

Comments
 (0)