-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V14: Add cancellation tokens to all endpoints #15984
V14: Add cancellation tokens to all endpoints #15984
Conversation
# Conflicts: # src/Umbraco.Cms.Api.Management/Controllers/DocumentBlueprint/Item/ItemDocumentBlueprintController.cs
src/Umbraco.Cms.Api.Management/Controllers/AuditLog/ByKeyAuditLogController.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 💪
I just found a few more controllers without the CancellationToken cancellationToken
parameter - some that were forgotten (in Item and Tree folders) and some new endpoints (like Document Version/Blueprint ones).
I will push the changes, please have a look at them and we can merge this after 🙂
Looks good, and thanks for keeping an eye out for the missed controllers 🎉, turns out that sometimes you can't see the trees for the forest 🙈 |
Adds a
CancellationToken
to all endpoints, currently, this isn't used at all, but it will allow us to cancel a request in the future without breaking our API.For the most part, this is pretty run-of-the-mill, the only really interesting part is that I had to alter the
UmbracoTestServerTestBase
slightly to make it work.This is because we use the method parameters to automagically add them as query parameters, however, this is not relevant for cancellation tokens, so I remove those before resolving the query parameters.