Skip to content

Commit 357a21f

Browse files
committed
feat: [torrust#801] new user listing type
1 parent 07abaf1 commit 357a21f

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/models/response.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use url::Url;
33

44
use super::category::Category;
55
use super::torrent::TorrentId;
6-
use super::user::UserProfile;
6+
use super::user::UserListing;
77
use crate::databases::database::Category as DatabaseCategory;
88
use crate::models::torrent::TorrentListing;
99
use crate::models::torrent_file::TorrentFile;
@@ -129,5 +129,5 @@ pub struct TorrentsResponse {
129129
#[derive(Serialize, Deserialize, Debug, sqlx::FromRow)]
130130
pub struct UserProfilesResponse {
131131
pub total: u32,
132-
pub results: Vec<UserProfile>,
132+
pub results: Vec<UserListing>,
133133
}

src/models/user.rs

+11
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ pub struct UserFull {
5555
pub avatar: String,
5656
}
5757

58+
#[allow(clippy::module_name_repetitions)]
59+
#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone, sqlx::FromRow)]
60+
pub struct UserListing {
61+
pub user_id: UserId,
62+
pub username: String,
63+
pub email: String,
64+
pub email_verified: bool,
65+
pub date_registered: String,
66+
pub administrator: bool,
67+
}
68+
5869
#[allow(clippy::module_name_repetitions)]
5970
#[derive(Debug, Serialize, Deserialize, Clone)]
6071
pub struct UserClaims {

0 commit comments

Comments
 (0)