-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(123open): get direct link #1185
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
Conversation
…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>
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
There was a problem hiding this 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.
ILoveScratch2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* 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>
* 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>
Description / 描述
修改 fileID 的拼写
修复 UserInfoResp 结构体中的类型错误(直接注释无用部分避免后续调整)
优化直链获取时 UID 的读取逻辑,缓存 UID
Motivation and Context / 背景
修复 failed link: failed get link: fileID格式异常
How Has This Been Tested? / 测试
配置:
获取直链、直链有效期正常
Checklist / 检查清单
我已阅读 CONTRIBUTING 文档。
go fmtor prettier.我已使用
go fmt或 prettier 格式化提交的代码。我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。
我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。
我已相应更新了相关仓库(若适用)。