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(backend revision): Update patch column when removing revisions #5574

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

yamashush
Copy link
Contributor

Component/Part

backend revision

Description

This PR fixes the following feature's bug.

  /**
   * @async
   * Purge revision history of a note.
   * @param {Note} note - the note to purge the history
   * @return {Revision[]} an array of purged revisions
   */
  async purgeRevisions(note: Note): Promise<Revision[]> {

If we delete all revisions except the latest one, we need to update the patch column of the latest one.

Steps

  • Added implementation
  • Added / updated tests
  • I read the contribution documentation and
    made sure that:
    • My commits are signed-off to accept the DCO.
    • This PR targets the correct branch: master for 1.x & docs, develop for 2.x

Related Issue(s)

Copy link
Member

@ErikMichelson ErikMichelson left a comment

Choose a reason for hiding this comment

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

Sorry, that this took so long, being quite busy currently. I tested it and it works perfectly. Just some linting errors and another small thing.

Thanks for your contribution! :)

backend/src/revisions/revisions.service.spec.ts Outdated Show resolved Hide resolved
backend/src/revisions/revisions.service.spec.ts Outdated Show resolved Hide resolved
@yamashush
Copy link
Contributor Author

@ErikMichelson Sorry for being so late 🙏
I've finished making the changes, so please review again 😄

Signed-off-by: yamashush <38120991+yamashush@users.noreply.github.com>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
@ErikMichelson ErikMichelson merged commit e99ba06 into hedgedoc:develop Aug 23, 2024
22 checks passed
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.

None yet

2 participants