@@ -7,13 +7,13 @@ use crate::models::paste_id::PasteId;
|
|||||||
use crate::models::pretty_syntax::PasteIdSyntax;
|
use crate::models::pretty_syntax::PasteIdSyntax;
|
||||||
use crate::models::response_wrapper::ResponseWrapper;
|
use crate::models::response_wrapper::ResponseWrapper;
|
||||||
|
|
||||||
#[get("/r/<id>", rank = 2)]
|
#[get("/<id>", rank = 2)]
|
||||||
pub async fn retrieve(id: PasteId<'_>) -> ResponseWrapper<File> {
|
pub async fn retrieve(id: PasteId<'_>) -> ResponseWrapper<File> {
|
||||||
retrieve_inner(&id.to_string()).await
|
retrieve_inner(&id.to_string()).await
|
||||||
}
|
}
|
||||||
|
|
||||||
// rank 1 here because this would be more oftenly used
|
// rank 1 here because this would be more oftenly used
|
||||||
#[get("/r/<id_ext>", rank = 1)]
|
#[get("/<id_ext>", rank = 1)]
|
||||||
pub async fn retrieve_ext(id_ext: PasteIdSyntax<'_>) -> ResponseWrapper<File> {
|
pub async fn retrieve_ext(id_ext: PasteIdSyntax<'_>) -> ResponseWrapper<File> {
|
||||||
retrieve_inner(&id_ext.get_fname().to_string()).await
|
retrieve_inner(&id_ext.get_fname().to_string()).await
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user