Skip to content

Commit 02e61bd

Browse files
committed
style(api): 格式化代码和注释
- 格式化 `labelapi.rs` 文件中的代码,将多行代码合并为一行以提高可读性。 - 格式化 `postapi.rs` 文件中的代码,调整缩进和换行,使其更符合代码风格规范。 - 格式化 `comment.rs` 文件中的代码,调整注释和属性以保持一致性。 - 格式化 `llm.rs` 文件中的代码,调整换行和对齐,使其更易读。 - 格式化 `m20260210_000001_init.rs` 文件中的代码,合并多行定义为一行以简化代码结构。 - 格式化 `routes.rs` 文件中的代码,调整换行和缩进,使其更符合代码风格规范。
1 parent 26de0d5 commit 02e61bd

7 files changed

Lines changed: 1108 additions & 1063 deletions

File tree

backend/src/api/labelapi.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,7 @@ pub async fn delete_label(
184184
) -> Result<impl IntoResponse, ApiError> {
185185
identity.require_admin()?;
186186

187-
let result = label::Entity::delete_by_id(id)
188-
.exec(&state.conn)
189-
.await?;
187+
let result = label::Entity::delete_by_id(id).exec(&state.conn).await?;
190188

191189
if result.rows_affected == 0 {
192190
return Err(ApiError::not_found(format!("未找到 ID 为 {id} 的标签")));

0 commit comments

Comments
 (0)