From 92c22848e5f6f1b76c2d727c6a9ba146003bdf9b Mon Sep 17 00:00:00 2001 From: Kuoi Date: Sat, 28 May 2022 01:43:14 +0100 Subject: [PATCH] fix the path --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index f615063..1bff798 100644 --- a/src/main.rs +++ b/src/main.rs @@ -144,7 +144,7 @@ async fn current(db: web::Data) -> impl Responder { HttpResponse::Ok().json(result) } -#[get("/imlonghao-api/logs")] +#[get("/api/logs")] async fn logs(db: web::Data) -> impl Responder { let conn = db.get().await.unwrap(); let rows = conn @@ -182,7 +182,7 @@ async fn logs(db: web::Data) -> impl Responder { HttpResponse::Ok().json(results) } -#[get("/imlonghao-api/pkg/{name}")] +#[get("/api/pkg/{name}")] async fn get_pkg( name: web::Path, db: web::Data, @@ -220,7 +220,7 @@ async fn get_pkg( HttpResponse::Ok().json(results) } -#[get("/imlonghao-api/pkg/{name}/log/{ts}")] +#[get("/api/pkg/{name}/log/{ts}")] async fn get_pkg_log( path: web::Path<(String, i64)>, db: web::Data,