Skip to content

Commit 76b1015

Browse files
Update v15
1 parent 9956204 commit 76b1015

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

15/umbraco-cms/reference/querying/itagquery.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,17 @@ After this you can use `_tagQuery` to access the `ITagQuery`.
1818

1919
If you're using it in controllers, you can inject it into the constructor like so:
2020

21-
{% hint style="warning" %}
22-
The example below uses UmbracoApiController which is obsolete in Umbraco 14 and will be removed in Umbraco 15.
23-
{% endhint %}
24-
2521
```csharp
2622
using System.Collections.Generic;
2723
using System.Linq;
2824
using Microsoft.AspNetCore.Mvc;
2925
using Umbraco.Cms.Core.PublishedCache;
30-
using Umbraco.Cms.Web.Common.Controllers;
3126

3227
namespace UmbracoHelperDocs.Controllers;
3328

34-
[Route("tags/[action]")]
35-
public class TagApiController : UmbracoApiController
29+
[ApiController]
30+
[Route("/umbraco/api/tags")]
31+
public class TagApiController : Controller
3632
{
3733
private readonly ITagQuery _tagQuery;
3834

@@ -41,6 +37,7 @@ public class TagApiController : UmbracoApiController
4137
_tagQuery = tagQuery;
4238
}
4339

40+
[HttpGet("getmediatags")]
4441
public ActionResult<IEnumerable<string>> GetMediaTags()
4542
{
4643
return _tagQuery.GetAllMediaTags().Select(tag => tag.Text).ToList();

0 commit comments

Comments
 (0)