Commit 5921b424 authored by Heinz N. Gies's avatar Heinz N. Gies

make files optional

parent f4ebdf17
......@@ -54,6 +54,7 @@ struct Image {
image_type: String,
os: String,
origin: Option<Uuid>,
#[serde(default = "empty_files")]
files: Vec<ImageFile>,
published_at: Option<DateTime<Utc>>,
public: bool,
......@@ -250,3 +251,7 @@ pub fn import(config: &Config, uuid: Uuid) -> Result<i32, Box<Error>> {
serde_json::to_writer(cfg_file, &manifest)?;
fn empty_files() -> Vec<ImageFile> {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment