Skip to content

Comments

refactor(services/seafile): Refactor raw request send in writer and lister#6104

Merged
Xuanwo merged 3 commits intoapache:mainfrom
jorgehermo9:seafile-request-refactor
Apr 27, 2025
Merged

refactor(services/seafile): Refactor raw request send in writer and lister#6104
Xuanwo merged 3 commits intoapache:mainfrom
jorgehermo9:seafile-request-refactor

Conversation

@jorgehermo9
Copy link
Contributor

Prior to work on #5774 we need all Request::* calls in core.rs


pub struct ListResponse {
pub infos: Option<Vec<Info>>,
pub rooted_abs_path: String,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have to return rooted_abs_path in list response because let rooted_abs_path = build_rooted_abs_path(&self.root, path); is called in core.rs list funcion, and we neet it also in lister.rs

&format!("{}{}", list_response.rooted_abs_path, info.name),

The alternative is to duplicate let rooted_abs_path = build_rooted_abs_path(&self.root, path); in lister.rs, but I prefer to return it in the list response as done here

}

#[derive(Debug, Deserialize)]
pub struct Info {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved this from lister.rs to here

@jorgehermo9 jorgehermo9 marked this pull request as ready for review April 27, 2025 11:50
@jorgehermo9 jorgehermo9 requested a review from Xuanwo as a code owner April 27, 2025 11:50
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. releases-note/refactor The PR does a refactor on code or has a title that begins with "refactor" labels Apr 27, 2025
@jorgehermo9 jorgehermo9 changed the title refactor(services/seafile): Refactor raw request send in writer refactor(services/seafile): Refactor raw request send in writer and lister Apr 27, 2025
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thank you @jorgehermo9 for this change.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 27, 2025
@Xuanwo Xuanwo merged commit ce8683f into apache:main Apr 27, 2025
91 checks passed
@jorgehermo9 jorgehermo9 deleted the seafile-request-refactor branch April 27, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/refactor The PR does a refactor on code or has a title that begins with "refactor" size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants