refactor: implement fetchall with generic type
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user