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

feat(core): Add endpoint GET /projects/:projectId/folders (no-changelog) #13519

Open
wants to merge 13 commits into
base: ado-3167-be-add-endpoint-to-delete-folder
Choose a base branch
from

Conversation

RicardoE105
Copy link
Contributor

@RicardoE105 RicardoE105 commented Feb 26, 2025

Based on PR #13516

Chain of upstream PRs as of 2025-02-25

Summary

This endpoint retrieves a list of available folders where the user can move the contents of a deleted folder.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/ADO-3270/[be]-add-endpoint-to-list-folders

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)

@RicardoE105 RicardoE105 self-assigned this Feb 26, 2025
@RicardoE105 RicardoE105 changed the title Add endpoint to list folders feat(core): Add endpoint GET /projects/:projectId/folders (no-changelog) Feb 26, 2025
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Feb 26, 2025
@RicardoE105 RicardoE105 force-pushed the ado-3270-be-add-endpoint-to-list-folders branch from 8125da0 to e4d2f90 Compare February 26, 2025 12:37
@@ -213,7 +213,9 @@ export class FolderRepository extends Repository<FolderWithWorkflowCount> {
direction: 'DESC' | 'ASC',
): void {
if (field === 'name') {
query.orderBy('LOWER(folder.name)', direction);
query
.addSelect('LOWER(folder.name)', 'folder_name_lower')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixes bug that found that throws error if sortBy name without explicitly selecting name


const [data, count] = await this.folderService.getManyAndCount(
projectId,
payload as ListQuery.Options,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

removing this type assertion would require some more refactoring in the folder service and repository as in the workflow service and repository

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant