Skip to content

Commit cfda3c1

Browse files
Change UmbracoApiController to Controller
1 parent 2a7eec1 commit cfda3c1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

14/umbraco-cms/reference/querying/umbraco-context.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ using System.Diagnostics;
2929
using System.Linq;
3030
using Microsoft.AspNetCore.Mvc;
3131
using Umbraco.Cms.Core.Web;
32-
using Umbraco.Cms.Web.Common.Controllers;
3332
using Umbraco.Cms.Web.Common.PublishedModels;
3433
using Umbraco.Extensions;
3534

3635
namespace Umbraco.Docs.Samples.Web.Controllers.Api;
3736

38-
public class PeopleController : UmbracoApiController
37+
[ApiController]
38+
[Route("/umbraco/api/people")]
39+
public class PeopleController : Controller
3940
{
4041
private readonly IUmbracoContextAccessor _umbracoContextAccessor;
4142

@@ -44,7 +45,7 @@ public class PeopleController : UmbracoApiController
4445
_umbracoContextAccessor = umbracoContextAccessor;
4546
}
4647

47-
[HttpGet]
48+
[HttpGet("getall")]
4849
public ActionResult<IEnumerable<string>> GetAll()
4950
{
5051
if (_umbracoContextAccessor.TryGetUmbracoContext(out IUmbracoContext? context) == false)

0 commit comments

Comments
 (0)