refactor: implement fetchall with generic type

This commit is contained in:
mokurin000
2025-08-02 19:39:39 +08:00
parent de330005b3
commit 9b53cb633c
9 changed files with 233 additions and 146 deletions

View File

@@ -9,6 +9,12 @@ pub struct GetUserPreviewApi {
pub user_id: u32,
}
impl From<u32> for GetUserPreviewApi {
fn from(user_id: u32) -> Self {
Self { user_id }
}
}
#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)]
#[serde(rename_all = "camelCase")]
pub struct GetUserPreviewApiResp {