-
Notifications
You must be signed in to change notification settings - Fork 3
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
统一版本接口 #200
base: master
Are you sure you want to change the base?
统一版本接口 #200
Conversation
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.
先看一点,之后抽时间再看
#[resp_result] | ||
// TODO: 这里把挂载的东西一起带进去可能会好点? | ||
#[instrument(skip_all,fields(version = %arg_2.0))] | ||
pub async fn release_version( |
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.
这个写到cdn下面,要上腾讯云cdn,然后接一下之前写刷新cdn的接口在逻辑层那些改动的地方
@@ -51,6 +51,6 @@ type OperateResult<T> = Result<T, OperateError>; | |||
|
|||
impl<'db, Conn> OperationDatabaseOperate<'db, Conn> { | |||
pub fn plugin_version(&self) -> PluginVersionOperate<'_, Conn> { | |||
self.child() | |||
SuperOperate::child(self) |
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.
这边是为什么要改成这样子写
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.
这边要上cdn,不需要自己搞这个modify cache了吧
Chrome, | ||
Firefox, | ||
Edge, |
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.
这边还得加一个叫"其他浏览器",这些是只有zip安装到时候
let sort = doc! { | ||
"$natural": -1i32 | ||
}; |
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.
这边改成“_id”可能更好点?nature就是原本mongo文件顺序
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.
_id 是和时间相关的吗?如果是那也行
// 找到当前平台的最新的发布版本,与当前添加版本比较。新版本必须更新 | ||
let filter = doc! {"platform":to_bson(&release_version.platform)?}; | ||
let exist_latest_version = collection | ||
.with_mapping::<VersionOnly>() | ||
.doing(|collection| { | ||
collection.find_one( | ||
filter, | ||
FindOneOptions::builder() | ||
.sort(doc! {"$natural": -1i32}) | ||
.projection(doc! {"version":1i32}) | ||
.build(), | ||
) | ||
}) | ||
.await?; | ||
if let Some(VersionOnly { version }) = exist_latest_version { | ||
if release_version.version <= version { | ||
Err(Error::VersionTooOld(version, release_version.platform))?; | ||
} | ||
} |
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.
这部分是不是写到verify
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.
这边可能还要支持一下update delete,update delete支持新表就够了。还有个日志列表,去包含版本、更新内容、平台这些信息,给后端做分页表格查询用,也给前端展示历史更新用
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.
update delete是声明意思?
- 什么是表新?
- 日志列表就是全部历史版本?
.build(), | ||
) | ||
.extend_download_source( | ||
["Chrome", "Edge", "FireFox"] |
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.
加两个字,商店
) | ||
.add_download_source( | ||
DownloadSourceItem::builder() | ||
.name("ZIP") |
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.
加三个字,包下载其他一样
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.
然后缺少后台的统一的create update read delete的http接口
统一版本接口