diff --git a/src/post.rs b/src/post.rs index 3c45bc4..166162e 100644 --- a/src/post.rs +++ b/src/post.rs @@ -56,8 +56,11 @@ async fn render(id: String, sort: String) -> Result { } // SERVICES -pub async fn short(web::Path(id): web::Path) -> Result { - render(id.to_string(), "confidence".to_string()).await +pub async fn short(web::Path(id): web::Path, params: web::Query) -> Result { + match ¶ms.sort { + Some(sort) => render(id, sort.to_string()).await, + None => render(id, "confidence".to_string()).await, + } } pub async fn page(web::Path((_sub, id)): web::Path<(String, String)>, params: web::Query) -> Result {