Move to "show pretty" currently a dupe of 'show'.
This commit is contained in:
@@ -32,6 +32,15 @@ async fn search(
|
||||
Ok(Json(res))
|
||||
}
|
||||
|
||||
#[get("/show/<query>/pretty")]
|
||||
async fn show_pretty(
|
||||
nm: &State<Notmuch>,
|
||||
query: &str,
|
||||
) -> Result<Json<ThreadSet>, Debug<NotmuchError>> {
|
||||
let res = nm.show(query)?;
|
||||
Ok(Json(res))
|
||||
}
|
||||
|
||||
#[get("/show/<query>")]
|
||||
async fn show(nm: &State<Notmuch>, query: &str) -> Result<Json<ThreadSet>, Debug<NotmuchError>> {
|
||||
let res = nm.show(query)?;
|
||||
@@ -110,7 +119,15 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||
let _ = rocket::build()
|
||||
.mount(
|
||||
"/",
|
||||
routes![original_part, original, hello, search_all, search, show],
|
||||
routes![
|
||||
original_part,
|
||||
original,
|
||||
hello,
|
||||
search_all,
|
||||
search,
|
||||
show_pretty,
|
||||
show
|
||||
],
|
||||
)
|
||||
.attach(cors)
|
||||
.manage(Notmuch::default())
|
||||
|
||||
Reference in New Issue
Block a user