From 3b4bb866ab8681dcc58aa9aaf837f9809de467e1 Mon Sep 17 00:00:00 2001 From: kieran Date: Fri, 7 Feb 2025 14:36:01 +0000 Subject: [PATCH] fix: uploaded timestamp blossom --- src/bin/main.rs | 8 +++++++- src/routes/blossom.rs | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/bin/main.rs b/src/bin/main.rs index 10446c6..e3bf5c2 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -73,7 +73,13 @@ async fn main() -> Result<(), Error> { .attach(Shield::new()) // disable .mount( "/", - routes![root, get_blob, head_blob, routes::void_cat_redirect, routes::void_cat_redirect_head], + routes![ + root, + get_blob, + head_blob, + routes::void_cat_redirect, + routes::void_cat_redirect_head + ], ) .mount("/admin", routes::admin_routes()); diff --git a/src/routes/blossom.rs b/src/routes/blossom.rs index 1a9795f..0072f39 100644 --- a/src/routes/blossom.rs +++ b/src/routes/blossom.rs @@ -25,7 +25,7 @@ pub struct BlobDescriptor { pub size: u64, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub mime_type: Option, - pub created: u64, + pub uploaded: u64, #[serde(rename = "nip94", skip_serializing_if = "Option::is_none")] pub nip94: Option>, } @@ -45,7 +45,7 @@ impl BlobDescriptor { sha256: id_hex, size: value.size, mime_type: Some(value.mime_type.clone()), - created: value.created.timestamp() as u64, + uploaded: value.created.timestamp() as u64, nip94: Some( Nip94Event::from_upload(settings, value) .tags