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

[Technical] Use invoke operator to execute usecases #4179

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

abelgardep
Copy link
Contributor

Minimal refactor. It removes all the execute verbosity for use cases.

Previous approach:
fun execute(params: Params): Type = run(params)

Operator approach:
operator fun invoke(params: Params): Type = run(params)

Instead of useCase.execute(useCaseParams), operator allows us to useCase(useCaseParams)

Related Issues

Overseeds #4136


QA

@jesmrec
Copy link
Collaborator

jesmrec commented Oct 6, 2023

Thanks a lot @abelgardep. Looking forward to merge it!

Copy link
Collaborator

@JuancaG05 JuancaG05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot again @abelgardep! ❤️

@JuancaG05 JuancaG05 merged commit 068c953 into master Oct 6, 2023
5 checks passed
@JuancaG05 JuancaG05 deleted the technical/usecases_invoke branch October 6, 2023 06:54
@jesmrec jesmrec removed the Sprint label Oct 6, 2023
@JuancaG05 JuancaG05 self-assigned this Oct 10, 2023
jesmrec pushed a commit that referenced this pull request Oct 20, 2023
[Technical] Use invoke operator to execute usecases
Aitorbp pushed a commit that referenced this pull request Feb 5, 2024
[Technical] Use invoke operator to execute usecases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants