Generate backlinks
Some checks failed
CI / Check typos (push) Successful in 8s
CI / Clippy (push) Successful in 1m8s
CI / Build and test (push) Successful in 1m5s
CI / Check links (push) Failing after 1m16s
CI / Build container (push) Successful in 46s
CI / Deploy on waypoint (push) Successful in 45s
Some checks failed
CI / Check typos (push) Successful in 8s
CI / Clippy (push) Successful in 1m8s
CI / Build and test (push) Successful in 1m5s
CI / Check links (push) Failing after 1m16s
CI / Build container (push) Successful in 46s
CI / Deploy on waypoint (push) Successful in 45s
This commit is contained in:
@@ -15,7 +15,7 @@ pub struct PageMetadata {
|
||||
pub author: Option<String>,
|
||||
pub description: Option<String>,
|
||||
pub image: Option<String>,
|
||||
pub slug: Option<String>,
|
||||
pub backlinks: Option<bool>,
|
||||
}
|
||||
|
||||
impl Default for PageMetadata {
|
||||
@@ -25,7 +25,7 @@ impl Default for PageMetadata {
|
||||
author: None,
|
||||
description: None,
|
||||
image: None,
|
||||
slug: None,
|
||||
backlinks: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ use axum::http::HeaderMap;
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct RequestContext {
|
||||
pub client_info: ClientInfo,
|
||||
pub route: String,
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -170,7 +170,10 @@ impl PageServer {
|
||||
device_type = ?client_info.device_type
|
||||
);
|
||||
|
||||
let req_ctx = RequestContext { client_info };
|
||||
let req_ctx = RequestContext {
|
||||
client_info,
|
||||
route: format!("/{route}"),
|
||||
};
|
||||
|
||||
let cache_key = (route.clone(), req_ctx.clone());
|
||||
let now = Utc::now();
|
||||
|
||||
Reference in New Issue
Block a user