Skip to content

Delete unused callback on isSlugUnique function #3022

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

Merged
merged 2 commits into from
Mar 8, 2024

Conversation

lindapaiste
Copy link
Collaborator

Ref #521
This is part of a larger effort to move away from callback-based code.

Quick & easy cleanup. projectSchema.methods.isSlugUnique supports an optional callback cb argument. But the one place in the code where we use this function is already using it as an async. So we can safely delete all logic related to the callback.

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

@lindapaiste lindapaiste added Area: Code Quality For refactoring, cleanup, or improvements to maintainability Area:Backend For server-side logic, APIs, or database functionality labels Feb 14, 2024
@raclim raclim added this to the MINOR Release for 2.13.0 milestone Mar 8, 2024
Copy link
Collaborator

@raclim raclim left a comment

Choose a reason for hiding this comment

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

Thanks for catching this, it's so much easier to read!

@raclim raclim merged commit 47aa8fd into processing:develop Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Backend For server-side logic, APIs, or database functionality Area: Code Quality For refactoring, cleanup, or improvements to maintainability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants