diff --git a/html/current.html b/html/current.html
index dc83542..51b03f3 100644
--- a/html/current.html
+++ b/html/current.html
@@ -24,7 +24,7 @@
$(document).ready(function () {
$('#l').DataTable({
"ajax": {
- url: "/imlonghao-api/current",
+ url: "/api/current",
dataSrc: ""
},
"order": [[0, "desc"]],
diff --git a/html/logs.html b/html/logs.html
index fa4ebc3..9f2d4c4 100644
--- a/html/logs.html
+++ b/html/logs.html
@@ -27,7 +27,7 @@
hour12: false,
});
$(window).on('hashchange', function () {
- url = window.location.hash.includes("#") ? "/imlonghao-api/pkg/" + window.location.hash.slice(1) : "/imlonghao-api/logs"
+ url = window.location.hash.includes("#") ? "/api/pkg/" + window.location.hash.slice(1) : "/api/logs"
$.get(url, function (newDataArray) {
let datatable = $('#l').DataTable()
datatable.clear()
@@ -36,7 +36,7 @@
});
});
$(document).ready(function () {
- url = window.location.hash.includes("#") ? "/imlonghao-api/pkg/" + window.location.hash.slice(1) : "/imlonghao-api/logs"
+ url = window.location.hash.includes("#") ? "/api/pkg/" + window.location.hash.slice(1) : "/api/logs"
$('#l').DataTable({
"searchDelay": 100,
"iDisplayLength": 100,
@@ -118,7 +118,7 @@
title: "Log",
data: "ts",
render: function (data, type, row, meta) {
- return `Log`
+ return `Log`
}
},
{
diff --git a/src/main.rs b/src/main.rs
index ed4022e..5c989bb 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -97,7 +97,7 @@ fn get_maintainer(pkg: String) -> Result {
Ok(maintainers.join(", "))
}
-#[get("/imlonghao-api/status")]
+#[get("/api/status")]
async fn status(db: web::Data) -> impl Responder {
let conn = db.get().await.unwrap();
let rows = conn
@@ -113,7 +113,7 @@ async fn status(db: web::Data) -> impl Responder {
HttpResponse::Ok().json(result)
}
-#[get("/imlonghao-api/current")]
+#[get("/api/current")]
async fn current(db: web::Data) -> impl Responder {
let conn = db.get().await.unwrap();
let rows = conn