Skip to content

Conversation

@xrgzs
Copy link
Member

@xrgzs xrgzs commented Aug 29, 2025

Description / 描述

  1. 修改 fileID 的拼写

  2. 修复 UserInfoResp 结构体中的类型错误(直接注释无用部分避免后续调整)

  3. 优化直链获取时 UID 的读取逻辑,缓存 UID

Motivation and Context / 背景

修复 failed link: failed get link: fileID格式异常

How Has This Been Tested? / 测试

配置:

image

获取直链、直链有效期正常

image

Checklist / 检查清单

  • I have read the CONTRIBUTING document.
    我已阅读 CONTRIBUTING 文档。
  • I have formatted my code with go fmt or prettier.
    我已使用 go fmtprettier 格式化提交的代码。
  • I have added appropriate labels to this PR (or mentioned needed labels in the description if lacking permissions).
    我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。
  • I have requested review from relevant code authors using the "Request review" feature when applicable.
    我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。
  • I have updated the repository accordingly (If it’s needed).
    我已相应更新了相关仓库(若适用)。

xrgzs added 3 commits August 29, 2025 20:52
…in getDirectLink function

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
…serInfoResp struct

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
@xrgzs xrgzs requested review from ILoveScratch2 and Copilot August 29, 2025 13:11
@xrgzs xrgzs marked this pull request as ready for review August 29, 2025 13:11

This comment was marked as outdated.

@xrgzs xrgzs changed the title Fix/123open directlink fix(123open): get direct link Aug 29, 2025
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
@xrgzs xrgzs requested a review from Copilot August 29, 2025 13:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in the 123open driver related to direct link generation by correcting the parameter name in the API request and fixing type issues in the UserInfoResp struct.

  • Corrected API parameter name from "fileId" to "fileID" in direct link requests
  • Added a new getUID() method to efficiently retrieve user ID
  • Commented out unused fields in UserInfoResp struct to address type mismatch issues

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
drivers/123_open/util.go Added getUID() method and fixed API parameter name for direct link requests
drivers/123_open/types.go Commented out unused fields in UserInfoResp struct
drivers/123_open/driver.go Added UID field to struct and updated Link method to use new getUID() function

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@ILoveScratch2 ILoveScratch2 left a comment

Choose a reason for hiding this comment

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

LGTM

@xrgzs xrgzs merged commit 8188fb2 into OpenListTeam:main Aug 31, 2025
12 checks passed
@xrgzs xrgzs deleted the fix/123open-directlink branch August 31, 2025 07:47
ForSourceCodeAnalysis pushed a commit to ForSourceCodeAnalysis/OpenList that referenced this pull request Oct 4, 2025
* fix(123open): correct query parameter name from 'fileId' to 'fileID' in getDirectLink function

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

* fix(123open): change SpaceTempExpr type from 'string' to 'int64' in UserInfoResp struct

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

* fix(123open): comment out unused fields in UserInfoResp struct

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

* fix(123open): add getUID method and cache UID

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

---------

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
ForSourceCodeAnalysis pushed a commit to ForSourceCodeAnalysis/OpenList that referenced this pull request Oct 4, 2025
* fix(123open): correct query parameter name from 'fileId' to 'fileID' in getDirectLink function

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

* fix(123open): change SpaceTempExpr type from 'string' to 'int64' in UserInfoResp struct

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

* fix(123open): comment out unused fields in UserInfoResp struct

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

* fix(123open): add getUID method and cache UID

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

---------

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants