Skip to content

Commit

Permalink
kv: update tag dto (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZzIsGod1019 authored Jan 18, 2024
1 parent efb9a5f commit eaba2e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions spi/spi-kv/src/dto/kv_item_dto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ pub struct KvTagItemAddReq {
pub label: String,
pub color: String,
pub icon: String,
pub url: Option<String>,
pub service: Option<String>,
}

#[derive(poem_openapi::Object, Serialize, Deserialize, Debug)]
Expand All @@ -110,4 +112,6 @@ pub struct KvTagItemFindResp {
pub label: String,
pub color: String,
pub icon: String,
pub url: Option<String>,
pub service: Option<String>,
}
4 changes: 2 additions & 2 deletions spi/spi-kv/src/serv/kv_item_serv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub async fn find_tags(keys: Vec<String>, funs: &TardisFunsInst, ctx: &TardisCon
kind_code => Err(funs.bs_not_implemented(kind_code)),
}
.and_then(|items| {
Ok(items
items
.into_iter()
.map(|item| {
Ok(KvTagFindResp {
Expand All @@ -103,7 +103,7 @@ pub async fn find_tags(keys: Vec<String>, funs: &TardisFunsInst, ctx: &TardisCon
update_time: item.update_time,
})
})
.collect::<TardisResult<Vec<_>>>()?)
.collect::<TardisResult<Vec<_>>>()
})
}

Expand Down

0 comments on commit eaba2e9

Please sign in to comment.