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

统一版本接口 #200

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open

统一版本接口 #200

wants to merge 60 commits into from

Conversation

Goodjooy
Copy link
Contributor

@Goodjooy Goodjooy commented Jul 4, 2024

统一版本接口

  • 设计统一版本接口结构体
    • 新旧类型转换
  • 旧类型弃用
  • 版本迁移postprepare
  • 统一版本接口设计
  • 旧接口弃用

@Goodjooy Goodjooy marked this pull request as ready for review July 8, 2024 05:25
@Goodjooy Goodjooy requested a review from phidiaLam July 8, 2024 05:25
Copy link
Member

@phidiaLam phidiaLam left a comment

Choose a reason for hiding this comment

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

先看一点,之后抽时间再看

src/serves/frontend/ceobe/operation/version/controllers.rs Outdated Show resolved Hide resolved
Copy link
Member

@phidiaLam phidiaLam left a 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接口

@Goodjooy Goodjooy marked this pull request as ready for review August 25, 2024 08:47
Comment on lines 71 to 83
pub async fn released_version_num(
db: MongoDatabaseOperate,
MapReject(filter): MapRejecter<Json<Option<QueryVersionFilter>>>,
) -> Result<usize> {
let filter = filter.unwrap_or_default();
let ret = db
.ceobe()
.operation()
.release_version()
.retrieve()
.total_num(filter.platform, filter.yanked)
.await?;
Ok(ret)
Copy link
Member

Choose a reason for hiding this comment

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

为什么分页总数是单独接口

@@ -0,0 +1,97 @@
use serde::{Deserialize, Deserializer, Serialize, Serializer};
Copy link
Member

Choose a reason for hiding this comment

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

包装这个文件是做什么的

Comment on lines +1 to +2
#![allow(clippy::manual_unwrap_or_default)]

Copy link
Member

Choose a reason for hiding this comment

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

这是为啥要加这个

@@ -8,7 +8,7 @@ use sub_model::SubModel;
use typed_builder::TypedBuilder;

use crate::{RecordUnit, RecordUnitUpdater, SetRecordUnit};

#[allow(clippy::duplicated_attributes)]
Copy link
Member

Choose a reason for hiding this comment

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

这边是什么attribute重复要加这个

@@ -20,5 +22,6 @@ pub(super) fn operation_router() -> ServerRoute {
.nest("/video", video_router())
.nest("/announcement", announcement_router())
.nest("/resource", resource_router())
.nest_controller(ReleaseVersionController, CDN)
Copy link
Member

Choose a reason for hiding this comment

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

有一说一,感觉这个加法还挺奇怪,是不是应该怎么样标记过这整个router是CDN的,然后把ReleaseVersionController加进来的时候就默认用的是CDN的

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

Successfully merging this pull request may close these issues.

2 participants