mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #5624] [MERGED] hotfix: clean up published docs with deleted collections #5286
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5286
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5624
Author: @mirarifhasan
Created: 11/27/2025
Status: ✅ Merged
Merged: 12/2/2025
Merged by: @mirarifhasan
Base:
patch← Head:hotfix/api-doc-collection-deletetion📝 Commits (3)
e14e028feat: clean up published docs with deleted collections784a731refactor: published docs creator session serialization0a70615refactor: clean up orphaned published docs on fetch📊 Changes
4 files changed (+279 additions, -15 deletions)
View changed files
📝
packages/hoppscotch-backend/src/published-docs/published-docs.resolver.ts(+2 -5)📝
packages/hoppscotch-backend/src/published-docs/published-docs.service.spec.ts(+186 -3)📝
packages/hoppscotch-backend/src/published-docs/published-docs.service.ts(+91 -6)📝
packages/hoppscotch-backend/src/user-collection/user-collection.service.ts(+0 -1)📄 Description
What's changed
This pull request enhances the handling of published documents in the backend by ensuring that only documents with existing collections are returned, and automatically cleaning up any published docs associated with deleted or missing collections. It also adds comprehensive tests to verify this new behavior for both user and team published documents.
Published Docs Consistency and Cleanup:
getAllUserPublishedDocsandgetAllTeamPublishedDocsmethods inpublished-docs.service.tsto:Testing Enhancements:
published-docs.service.spec.tsto:Minor Cleanup:
user-collection.service.ts.Notes to reviewers
Nil
Summary by cubic
Ensure published docs only include entries whose collections still exist, and auto-delete orphaned records for users and teams. Also make the creator field nullable and move session serialization to the service.
Written for commit
0a70615eab. Summary will update automatically on new commits.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.