Add Attachment struct, new iface for create-rel
The Attachment struct exists, but this makes it glaringly obvious that I've made a bad interface. The create_release_attachment should only accept one file at a time and the loop over all files should happen in main.rs I've changed the signature, removed the loops, and wired in the newer error handling routines. Needs fixing at call sites.
This commit is contained in:
@@ -1,2 +1,15 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
pub mod release;
|
||||
pub mod repo;
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub struct Attachment {
|
||||
id: usize,
|
||||
name: String,
|
||||
size: i64,
|
||||
download_count: i64,
|
||||
created: String, // TODO: Date-time struct
|
||||
uuid: String,
|
||||
download_url: String,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user