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:
2025-06-07 23:50:16 -05:00
parent 4a0addda67
commit a5f6335b5f
2 changed files with 45 additions and 32 deletions

View File

@@ -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,
}