Skip to content

fix: make sure all local operations accept a PayloadRequest parameter - #3651

Merged
DanRibbens merged 3 commits into
payloadcms:mainfrom
diesieben07:issue/3650/missing-req-parameter-local
Oct 16, 2023
Merged

DanRibbens merged 3 commits into
payloadcms:mainfrom
diesieben07:issue/3650/missing-req-parameter-local

Conversation

@diesieben07

Copy link
Copy Markdown
Contributor

Description

Currently not all local operation functions accept a PayloadRequest parameter, making it so you cannot use them with manual transaction management. This PR adds this parameter to the operations that were missing it.

Fixes #3650

I am unsure how to best add tests for this, as I could not find any existing tests for the local API. Please let me know how to proceed here.

  • I have read and understand the CONTRIBUTING.md document in this repository.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • Existing test suite passes locally with my changes
  • I have made corresponding changes to the documentation

@DanRibbens

Copy link
Copy Markdown
Contributor

The local API isn't tested directly though it has a ton of coverage just from our various int.spec.ts files which almost all use it.

I wouldn't worry about having specific tests for it. I'll be bringing in some transaction tests in the near-term and it would be a good idea for me to incorporate this change into that.

Thanks for the PR and good insight catching the bug!

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.

Not all local operations accept a PayloadRequest parameter

2 participants