Skip to content
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

Add internal kernel API /api/repo/getRepoFile #10101

Closed
zxhd863943427 opened this issue Jan 7, 2024 · 4 comments
Closed

Add internal kernel API /api/repo/getRepoFile #10101

zxhd863943427 opened this issue Jan 7, 2024 · 4 comments
Assignees
Milestone

Comments

@zxhd863943427
Copy link
Contributor

zxhd863943427 commented Jan 7, 2024

支持从快照中获取文件

In what scenarios do you need this feature?

目前的 api 支持获取快照列表、快照对比、回滚快照,但是没有办法从快照中提取单个文件,无法指定回滚一个部分。希望能增加一个这个功能或 api

Describe the optimal solution

最好的角度来说,希望能在数据快照对比和文档右键菜单的文档历史里找到快照并回滚

Describe the candidate solution

如果不行或太麻烦,那希望能够根据快照文档id返回文档,目前的打开快照文档的api直接返回的是文档渲染后的dom,希望能提供一个api直接返回sy文件或其他类型文档本身。

Other information

No response

@88250
Copy link
Member

88250 commented Jan 7, 2024 via email

@88250
Copy link
Member

88250 commented Jan 8, 2024

刚刚看了下,应该是已经有接口的了 openRepoSnapshotDoc

在快照对比界面随便点一个文档:

image

如果是资源文件的话返回是这样的:

image

我先关闭了,如果还有问题请继续跟帖,谢谢 🙏

@88250 88250 closed this as completed Jan 8, 2024
@zxhd863943427
Copy link
Contributor Author

额,我的意思就是说,希望能传入 openRepoSnapshotDoc 同样的参数,但返回原始的、没有解析过的数据,类似于getFile api的返回,而不是解析后的dom和一行路径

@88250 88250 reopened this Jan 8, 2024
@88250 88250 self-assigned this Jan 8, 2024
@88250 88250 changed the title 支持从快照中获取文件 Add internal kernel API /api/repo/getRepoFile Jan 8, 2024
@88250 88250 added this to the 2.12.1 milestone Jan 8, 2024
@88250
Copy link
Member

88250 commented Jan 8, 2024

明白了,下个版本添加一个内部内核 API /api/repo/getRepoFile,谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants