Put all URLs under /api/

This commit is contained in:
2024-07-05 20:00:52 -07:00
parent 714e73aeb1
commit 5fc272054c
6 changed files with 26 additions and 18 deletions

View File

@@ -231,7 +231,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
let _ = rocket::build()
.mount(
"/",
shared::urls::MOUNT_POINT,
routes![
original,
refresh,

View File

@@ -337,7 +337,7 @@ impl QueryRoot {
.headers
.get_first_value("date")
.and_then(|d| mailparse::dateparse(&d).ok());
let cid_prefix = format!("/cid/{id}/");
let cid_prefix = shared::urls::cid_prefix(None, &id);
let body = match extract_body(&m, &id)? {
Body::PlainText(PlainText { text, content_tree }) => {
let text = if text.len() > MAX_RAW_MESSAGE_SIZE {