fix: uploaded timestamp blossom
This commit is contained in:
parent
c885a71295
commit
3b4bb866ab
@ -73,7 +73,13 @@ async fn main() -> Result<(), Error> {
|
|||||||
.attach(Shield::new()) // disable
|
.attach(Shield::new()) // disable
|
||||||
.mount(
|
.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());
|
.mount("/admin", routes::admin_routes());
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ pub struct BlobDescriptor {
|
|||||||
pub size: u64,
|
pub size: u64,
|
||||||
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||||
pub mime_type: Option<String>,
|
pub mime_type: Option<String>,
|
||||||
pub created: u64,
|
pub uploaded: u64,
|
||||||
#[serde(rename = "nip94", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "nip94", skip_serializing_if = "Option::is_none")]
|
||||||
pub nip94: Option<HashMap<String, String>>,
|
pub nip94: Option<HashMap<String, String>>,
|
||||||
}
|
}
|
||||||
@ -45,7 +45,7 @@ impl BlobDescriptor {
|
|||||||
sha256: id_hex,
|
sha256: id_hex,
|
||||||
size: value.size,
|
size: value.size,
|
||||||
mime_type: Some(value.mime_type.clone()),
|
mime_type: Some(value.mime_type.clone()),
|
||||||
created: value.created.timestamp() as u64,
|
uploaded: value.created.timestamp() as u64,
|
||||||
nip94: Some(
|
nip94: Some(
|
||||||
Nip94Event::from_upload(settings, value)
|
Nip94Event::from_upload(settings, value)
|
||||||
.tags
|
.tags
|
||||||
|
Loading…
x
Reference in New Issue
Block a user