Skip to content

Feature/fetch project resources - #103

Merged
hectordani03 merged 4 commits into
ReUC-Team:devfrom
Zama15:feature/fetch-project-resources
Nov 25, 2025
Merged

Feature/fetch project resources#103
hectordani03 merged 4 commits into
ReUC-Team:devfrom
Zama15:feature/fetch-project-resources

Conversation

@Zama15

@Zama15 Zama15 commented Nov 25, 2025

Copy link
Copy Markdown
Collaborator

Fetch Project Resources & File Handling Refactor

Description

This PR implements the retrieval of team-uploaded resources within the detailed project view, ensuring that soft-deleted files are correctly excluded from queries. It also standardizes how file links are mapped to DTOs across the application layer to adhere to DRY principles.

Key Changes

  • Infrastructure: Updated file repository queries to strictly ignore links with a deletedAt timestamp.
  • Application:
    • Refactored getDetailedProject to concurrently fetch and merge Application attachments and Project resources.
    • Added author details to project resource DTOs so the frontend can display who uploaded the file.
    • Created a shared utility for normalizing file links, removing code duplication between Project and Application details.
  • Database: Fixed a schema bug where the deletedAt field was automatically updating on edits due to an incorrect @updatedAt attribute.

Important

To migrate this change on the schema:

cd packages/infrastructure
pnpm run db:apply
  • Documentation: Updated OpenAPI response schemas to include the new resource fields and author information.

Now only fetch links that doesnt have deletedAt set
Now carry extra information
This was causing to create file and instantly deleting them
@hectordani03
hectordani03 merged commit 9981c61 into ReUC-Team:dev Nov 25, 2025
0 of 2 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.

2 participants