mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 08:09:22 +00:00
fix: short_url post to include org_id in path (#4731)
This commit is contained in:
@@ -46,8 +46,8 @@ use crate::service::short_url;
|
||||
),
|
||||
tag = "Short Url"
|
||||
)]
|
||||
#[post("/short")]
|
||||
pub async fn shorten(body: web::Bytes) -> Result<HttpResponse, Error> {
|
||||
#[post("/{org_id}/short")]
|
||||
pub async fn shorten(_org_id: web::Path<String>, body: web::Bytes) -> Result<HttpResponse, Error> {
|
||||
let req: config::meta::short_url::ShortenUrlRequest = serde_json::from_slice(&body)?;
|
||||
match short_url::shorten(&req.original_url).await {
|
||||
Ok(short_url) => {
|
||||
|
||||
Reference in New Issue
Block a user