@@ -42,18 +42,20 @@ pub async fn list(
42
42
. first :: < ( User , Option < bool > , Option < String > ) > ( & mut conn)
43
43
. await ?;
44
44
45
- let crates: Vec < ( i32 , String , DateTime < Utc > , i64 ) > = CrateOwner :: by_owner_kind ( OwnerKind :: User )
46
- . inner_join ( crates:: table)
47
- . filter ( crate_owners:: owner_id. eq ( user. id ) )
48
- . select ( (
49
- crates:: id,
50
- crates:: name,
51
- crates:: updated_at,
52
- rev_deps_subquery ( ) ,
53
- ) )
54
- . order ( crates:: name. asc ( ) )
55
- . load ( & mut conn)
56
- . await ?;
45
+ let crates: Vec < ( i32 , String , Option < String > , DateTime < Utc > , i64 ) > =
46
+ CrateOwner :: by_owner_kind ( OwnerKind :: User )
47
+ . inner_join ( crates:: table)
48
+ . filter ( crate_owners:: owner_id. eq ( user. id ) )
49
+ . select ( (
50
+ crates:: id,
51
+ crates:: name,
52
+ crates:: description,
53
+ crates:: updated_at,
54
+ rev_deps_subquery ( ) ,
55
+ ) )
56
+ . order ( crates:: name. asc ( ) )
57
+ . load ( & mut conn)
58
+ . await ?;
57
59
58
60
let crate_ids: Vec < _ > = crates. iter ( ) . map ( |( id, ..) | id) . collect ( ) ;
59
61
@@ -71,11 +73,12 @@ pub async fn list(
71
73
let verified = verified. unwrap_or ( false ) ;
72
74
let crates = crates
73
75
. into_iter ( )
74
- . map ( |( crate_id, name, updated_at, num_rev_deps) | {
76
+ . map ( |( crate_id, name, description , updated_at, num_rev_deps) | {
75
77
let versions = versions_by_crate_id. get ( & crate_id) ;
76
78
let last_version = versions. and_then ( |v| v. last ( ) ) ;
77
79
AdminCrateInfo {
78
80
name,
81
+ description,
79
82
updated_at,
80
83
num_rev_deps,
81
84
num_versions : versions. map ( |v| v. len ( ) ) . unwrap_or ( 0 ) ,
@@ -101,6 +104,7 @@ pub struct AdminListResponse {
101
104
#[ derive( Debug , Serialize ) ]
102
105
pub struct AdminCrateInfo {
103
106
pub name : String ,
107
+ pub description : Option < String > ,
104
108
pub updated_at : DateTime < Utc > ,
105
109
pub num_rev_deps : i64 ,
106
110
pub num_versions : usize ,
0 commit comments