Use / for raw pastes
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
This commit is contained in:
parent
2ab7ddb9c8
commit
884be16dc4
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue