Skip to content

Conversation

@mahiarirani
Copy link
Member

This pull request refactors the SwarmFile entity and its associated mapper and services, replacing the fileId property with id for consistency and simplifying the codebase. The changes span several files, including updates to method names, property definitions, and logic adjustments to align with the new naming convention.

Refactoring of SwarmFile Entity:

  • Removed the fileId property and its associated getter and setter methods from SwarmFile. Updated the constructor to exclude the fileId type definition. (lib/Db/SwarmFile.php: [1] [2] [3]

Updates to SwarmFileMapper:

  • Renamed the findByFileId method to findById and updated the query logic to use id instead of fileId. (lib/Db/SwarmFileMapper.php: lib/Db/SwarmFileMapper.phpL47-R53)

Adjustments in Service and Storage Logic:

  • Updated the getToken method in EthswarmService to use findById instead of findByFileId. (lib/Service/EthswarmService.php: lib/Service/EthswarmService.phpL77-R78)
  • Modified the copy method in BeeSwarm to use getId instead of getFileId and added support for copying the visibility property from the source file to the new file entry. (lib/Storage/BeeSwarm.php: [1] [2]

- update: mapper find method
- update: usages in service and storage
- fix: copy function to check for id value
Copy link
Collaborator

@JoaoSRaposo JoaoSRaposo left a comment

Choose a reason for hiding this comment

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

I tested the following features in the local development environment (NC 30):
Export: ok
Comments: ok
Upload: ok.
Download: ok.
Archive Files and Folders: ok.
Unarchive Files and Folders: ok.
Rename files: ok
Rename folder: ok

@JoaoSRaposo JoaoSRaposo merged commit 00562f9 into stage Jun 17, 2025
1 check passed
@JoaoSRaposo JoaoSRaposo deleted the fix/copy-swarm-file branch June 17, 2025 09:03
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.

3 participants