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

fix(API): PUT /credentials/:id should move the specified credential, not the first one in the database #11365

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

despairblue
Copy link
Contributor

Summary

Before this using the public API to move a credential would ignore the credential id in the path, due to a type error, and move the first credential it finds in the database that the user has access to.

This PR fixes this by fixing the type error and adding a test.

Related Linear tickets, Github issues, and Community forum posts

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@despairblue despairblue marked this pull request as ready for review October 23, 2024 10:17
@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Oct 23, 2024
Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link

cypress bot commented Oct 23, 2024

n8n    Run #7528

Run Properties:  status check passed Passed #7528  •  git commit 256fffe616: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 despairblue 🗃️ e2e/*
Project n8n
Branch Review fix-public-api-credential-move
Run status status check passed Passed #7528
Run duration 04m 19s
Commit git commit 256fffe616: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 despairblue 🗃️ e2e/*
Committer Danny Martini
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 3
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 458
View all changes introduced in this branch ↗︎

Copy link
Contributor

✅ All Cypress E2E specs passed

@despairblue despairblue merged commit e6b2f8e into master Oct 23, 2024
33 checks passed
@despairblue despairblue deleted the fix-public-api-credential-move branch October 23, 2024 12:21
@github-actions github-actions bot mentioned this pull request Oct 24, 2024
@janober
Copy link
Member

janober commented Oct 24, 2024

Got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants