Skip to content

[Technical] Use invoke operator to execute usecases - #4179

Merged
JuancaG05 merged 2 commits into
masterfrom
technical/usecases_invoke
Oct 6, 2023
Merged

JuancaG05 merged 2 commits into
masterfrom
technical/usecases_invoke

Conversation

@abelgardep

Copy link
Copy Markdown
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

jesmrec commented Oct 6, 2023

Copy link
Copy Markdown
Member

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

@JuancaG05 JuancaG05 left a comment

Copy link
Copy Markdown
Contributor

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 force-pushed the technical/usecases_invoke branch from e4fa713 to 8e1da24 Compare October 6, 2023 06:38
@JuancaG05
JuancaG05 merged commit 068c953 into master Oct 6, 2023
@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