File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -142,15 +142,13 @@ export default function() {
142
142
let dependencies = allDependencies . slice ( start , end ) ;
143
143
let total = allDependencies . length ;
144
144
145
- let serialized = this . serialize ( dependencies ) ;
145
+ let versions = schema . versions . find ( dependencies . models . map ( it => it . version_id ) ) ;
146
146
147
- // TODO https://github.com/rust-lang/crates.io/pull/810
148
- serialized . dependencies . forEach ( dep => {
149
- let version = schema . versions . find ( dep . version_id ) ;
150
- dep . crate_id = version . crate ;
151
- } ) ;
152
-
153
- return withMeta ( serialized , { total } ) ;
147
+ return {
148
+ ...this . serialize ( dependencies ) ,
149
+ ...this . serialize ( versions ) ,
150
+ meta : { total } ,
151
+ } ;
154
152
} ) ;
155
153
156
154
this . get ( '/crates/:crate_id/downloads' , function ( schema , request ) {
You can’t perform that action at this time.
0 commit comments