File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -716,6 +716,7 @@ impl From<VersionQueryResult> for Version {
716716 . files
717717 . into_iter ( )
718718 . map ( |f| VersionFile {
719+ id : Some ( f. id . 0 ) ,
719720 url : f. url ,
720721 filename : f. filename ,
721722 hashes : f. hashes ,
@@ -840,6 +841,10 @@ impl VersionStatus {
840841/// A single project file, with a url for the file and the file's hash
841842#[ derive( Serialize , Deserialize , Clone ) ]
842843pub struct VersionFile {
844+ /// The ID of the file. Every file has an ID once created, but it
845+ /// is not known until it indeed has been created.
846+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
847+ pub id : Option < i64 > ,
843848 /// A map of hashes of the file. The key is the hashing algorithm
844849 /// and the value is the string version of the hash.
845850 pub hashes : std:: collections:: HashMap < String , String > ,
Original file line number Diff line number Diff line change @@ -447,6 +447,7 @@ async fn version_create_inner(
447447 . files
448448 . iter ( )
449449 . map ( |file| VersionFile {
450+ id : None ,
450451 hashes : file
451452 . hashes
452453 . iter ( )
You can’t perform that action at this time.
0 commit comments