Skip to content
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

TemplateService should return all templates from GetAllAsync if no keys are passed #16254

Merged
merged 1 commit into from
May 13, 2024

Conversation

kjac
Copy link
Contributor

@kjac kjac commented May 10, 2024

Prerequisites

  • I have added steps to test this contribution in the description below

Description

This is the TemplateService equivalent of #16230

To align functionality of our services, GetAllAsync(params Guid[] keys) must return all templates if no keys have been passed to the method.

This is functionally breaking, but "only" towards the new V14 service methods.

I have verified that all consumers of this method are guarded by an explicit check for zero results, thus ensuring we don't accidentally return all templates when we're in fact wanting to return none.

Testing this PR

GetAllAsync(params Guid[] keys) is only used by the template "item" and "search" endpoints. Both should still work 😄

  • The "item" endpoint should return no templates if no item keys are passed.
  • The "search" endpoint should return no templates if there are zero matches to the search query.
  • The "search" endpoint should return no templates if paginating "past" the total number of results in a query that yields results.

@kjac kjac changed the title TemplateService: Return all templates from GetAllAsync if no keys are passed TemplateService - return all templates from GetAllAsync if no keys are passed May 10, 2024
@kjac kjac changed the title TemplateService - return all templates from GetAllAsync if no keys are passed TemplateService should return all templates from GetAllAsync if no keys are passed May 10, 2024
@nikolajlauridsen nikolajlauridsen merged commit 0790974 into v14/dev May 13, 2024
16 checks passed
@nikolajlauridsen nikolajlauridsen deleted the v14/fix/templateservice-getallasync branch May 13, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants